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.
Project's page says that
"johndoe@a.example.com" would be assigned username "johndoe", "johndoe@b.example.com" would be assigned "johndoe_1" and so forth.
Sadly, after update this is no longer true, instead of "johndoe" I'm getting "johndoe_666" where 666 is UID. We verified - there is no other "johndoe" on the user list.
Note: 666 is actual UID added when I encountered this problem. As a widely recognized satanistic symbol it caused some bad feelings.
Comment | File | Size | Author |
---|---|---|---|
#2 | email_registration_clean_name.zip | 2.37 KB | Mołot |
Comments
Comment #1
gregglesI updated the project page to explain the current behavior.
This was done for performance/scalability reasons. I appreciate that 666 is not a desirable number.
If you don't like this behavior you can implement hook_email_registration_name in a custom module as described in email_registration.api.php. I'm changing this issue to be about making a sub-module that makes this behavior optional instead of required. That should also help people understand how they can customize the behavior in their own module.
Comment #2
Mołot CreditAttribution: Mołot commentedHere you go. Tested, works, use as you please, attribute it to me if you will commit it to your repo, please.
Comment #3
gregglesThanks, Molot!
Comment #4
Mołot CreditAttribution: Mołot commentedNo problem. Paid by Novus CCTV Solutions anyway ;)
Comment #5
gregglesWould you like me to give credit to Novus in the commit? I'd be happy to do that, just let me know the format.
Comment #6
Mołot CreditAttribution: Mołot commentedWell, we needed it internally, for our own use (I'm employee of holding company), so Molot@novuscctv or Molot@AAT Holding would be appropriate. On the other hand - that's 3 lines of code. I'm not sure if it's worth to bother, really.