-
Notifications
You must be signed in to change notification settings - Fork 343
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
Error message not displayed on failed login #670
Comments
Can't get errors displaying as well. |
@jeremyquinton |
@jeremyquinton, thanks for your observations and workaround, they saved me a lot ;) Too bad that the developers seemed to have abandoned the project :( |
When form validation fails, for example when a user enters an invalid email address on the login for this piece of code executes
https://github.com/ZF-Commons/ZfcUser/blob/3.x/src/ZfcUser/Controller/UserController.php#L120
flashMessenger is used to set the error and the user is redirected back to the login form.
Looking in the Login controller action
https://github.com/ZF-Commons/ZfcUser/blob/3.x/src/ZfcUser/Controller/UserController.php#L94
there is nothing that handles the flash messenger error. I rectified this by overriding the login view script login.phtml - https://github.com/ZF-Commons/ZfcUser/blob/3.x/view/zfc-user/user/login.phtml
and adding the following code
I can submit a PR for this I just wanted to make sure first I haven't overlooked something and the fact this isn't an actual bug that the error is not displayed.
Another implementation idea might be to use the actual zend form error messages as this tells the user what is wrong. Currently the error just says
But if a user enters an invalid email address it might be worth telling them. Happy to try and submit a PR for this just thought it worth discussing implementation first.
The text was updated successfully, but these errors were encountered: