FOSUserBundle
FOSUserBundle copied to clipboard
Check username first on EmailUserProvider.php
This issue is related to #1336.
For example we have 2 users:
- User "Tom" with email "[email protected]"
- User "[email protected]" with email "[email protected]"
Which user should be selected if the input for username is '[email protected]'?
You could do these things: a) Allow usernames only. b) Allow email addresses only. c) Allow both and first look for email address. d) Allow both and first look for username.
Currently you can do everything except the last. I think we should add an option for checking the username first.
+1
I don't think this can be fixed correctly using two fields like the username_email provider do, even with an option you will still have one bad behavior, in one way or another.
Also the "c)" option does not exists currently.
The situation with the current implementation has changed: see #2650