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.

CommentFileSizeAuthor
#2 email_registration_clean_name.zip2.37 KBMołot
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggles’s picture

Title: UID always added to username » Create sub-module to disable uid appending to username, disabled by default
Category: Bug report » Feature request

I 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.

Mołot’s picture

Here you go. Tested, works, use as you please, attribute it to me if you will commit it to your repo, please.

greggles’s picture

Status: Active » Needs review

Thanks, Molot!

Mołot’s picture

No problem. Paid by Novus CCTV Solutions anyway ;)

greggles’s picture

Would you like me to give credit to Novus in the commit? I'd be happy to do that, just let me know the format.

Mołot’s picture

Well, 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.