I am including a patch to allow for role exclusion from auto usernaming.

Seemed like best logic was exclusionary rather than inclusion - in other words, by default no roles are selected and ALL users will be affected by AUN (as the module original did). But admin can now set any roles which they don't want to be affected - such as admins (as in my case).

Also, since no roles on registering - AUN will always initially apply.

CommentFileSizeAuthor
auto_username-role_exclusion.patch3.01 KBliquidcms

Comments

jibus’s picture

Version: 5.x-1.x-dev » 7.x-1.x-dev

Would be nice to have this feature for D7 version

alexkb’s picture

Status: Needs review » Closed (works as designed)

Is there a genuine use case for this functionality? As liquidcms points out, this feature would only apply when the "Update on user edit" setting is toggled on.

If you need this kind of functionality, it can be achieved by implementing your logic in a hook_auto_username_name().

Closing this request for now, but please re-open if people think there is a genuine use case.

jibus’s picture

Issue summary: View changes

Thanks for your message (long reply i know) ^^

The hook is perfect for this job.