-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[AuthController] Admin Interface shows password instead of email near "Logout" button #58
Comments
I was not able to fix this problem but I continued with the guide. In my case I created a table called "User" with phpMyAdmin and used the web-tools to create the models. Maybe you can give me an explanation. Thank you in advance. Kind regards, |
@ndL-1990 To display this instance as a string, the In my opinion, if the result displayed does not match the user's email, but his password, it is because the You would have to put the code of your model |
Hi @jcheron , Thank you for your help. I use a mySQL database where I created the "User" model: After creating the model (model/User.php) from database using the UbiquityAdmin, I checked out the class in detail. Because of your answer I checked out the
The function generated by the UbiquityAdmin returns the password instead of email but in the example with "messagerie" database, there it works. Here is the User Class Diagram of messagerie database: I can't find a difference between them when they are created, only in phpMyAdmin I can see that I added a Unique to the email field because the queries work faster when important fields are indexed. So it seems that we have to pay attention at the autogenerated models. Thank you for your advise and keep on the good work. 👍 P.S: You can close the issue if you have no idea why the Kind regards, |
Hi @ndL-1990 , private function getToStringField(){
$result=null;
foreach ( $this->members as $member ) {
if ($member->getDbType()!=="mixed" && $member->isNullable()!==true && !$member->isPrimary()) {
$result=$member->getName();
}
}
return $result;
} Which explains the difference between the two cases: This method makes a few arbitrary choices: it can certainly be improved. But it remains the developer's responsibility to then modify the automatically generated |
Hi @jcheron , Thank you for the explanation. I'll try to modify my local framework to add this to avoid running again into this error. Kind regards, |
Hi,
I followed the steps to implement the AuthController to the admin interface using the guide.
All is working fine until I saw an error in display.
I did no changes at core files.
Expected Result
In front of the "Logout" button should be the email of currently logged in user.
Actual Result
In my case the password is shown instead ?!
Versions
Kind regards,
ndL-1990
The text was updated successfully, but these errors were encountered: