First, thank you for this module. I like that it removes an extra field (user name) for users to remember by forcing a portion of the email, or in my case, the entire email to be the user name.
The problem I'm having is when a user clicks on the user edit form. Changing the email address here does not automatically update the user name and I think that creates a lot of confusion. If I change the administration settings to allow users to change their user name, than the user edit form displays both a user name and email address fields which add more confusion. Is there a way to force the same logic on the user edit form as in the user registration form where a change on the email results on a change to the user name based on what is returned from hook_email_registration_name()
Thanks
Comment | File | Size | Author |
---|---|---|---|
#6 | 2581397-6.email_registration.Optionally-change-user-name-when-users-email-is-changed.patch | 2.23 KB | joachim |
Comments
Comment #2
gregglesThis seems like a good idea as an optional feature, so updating some metadata to reflect that.
Comment #3
SergFromSD CreditAttribution: SergFromSD commentedI used hook_user_presave() to update the user id when the email address is changed. Since I also have my own hook_email_registration_name() I call that hook directly.
Comment #4
SergFromSD CreditAttribution: SergFromSD commentedComment #5
joachim CreditAttribution: joachim commentedI'm not sure that this should be optional.
The automatically-generated username is still shown around the site, as the project page says:
> This automatically generated username is still displayed name for posts, comments, etc.
So if a user registers, has an automatic username that's the local-part of their email address, and then changes their email address, then the local-part of their old email address could still be publicly shown, and that's not a good thing.
Comment #6
joachim CreditAttribution: joachim commentedHere's a patch that always updates the username if the email is changed.
Comment #7
jonathanshawEmail is not used in user name in 8.x RC5+, so this must be a 7.x issue.