Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I tihnk that user names are the thing of the past and e-mail address is now the default way of logging into websites. So I think we should get rid of the user name as the default login "name" and start using e-mails.
This way we can drop the double check for user name and e-mail address when creating new accounts programatically.
It would be nice to be able to log in with e-mail address since usernames can be easily forgotten.
Comment | File | Size | Author |
---|---|---|---|
#2 | email-login-support.patch | 3.71 KB | Anonymous (not verified) |
#1 | UserLoginForm-email-login.patch | 3 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedThis patch allows user to login with e-mail address.
UserPasswordForm form already works with e-mail address.
AccountFormController - to do. I'm not sure if the logic should go into the form or into the user_validate_name()
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedHere are both forms.
I hope it works since I have to manually edit every patch from PHPStorm to suit d.o
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedChanged the title.
Comment #4
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedThis patch basically tries to load the user by e-mail address if it was not loaded via username + on register/account form it prevents usage of username that is an e-mail address assigned to another account.
+ Fixed the strike-through in first comment..
Comment #6
PanchoDuplicate of #111317
Comment #7
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks, good to know.
Though I'll leave this open since it has working D8 patch.
Comment #8
dawehnerYou can copy over the existing patch to the other issue ... the other issue contains probably a lot of valueable discussion.
Comment #9
Anonymous (not verified) CreditAttribution: Anonymous commentedI just realized that one thing is missing: restriction upon user entity when it's created programmatically(or imported/migrated).
If this new entity has the same e-mail address as another user's user name it should now be created.