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.
| Comment | File | Size | Author |
|---|---|---|---|
| auto_username-role_exclusion.patch | 3.01 KB | liquidcms |
Comments
Comment #1
jibus commentedWould be nice to have this feature for D7 version
Comment #2
alexkb commentedIs 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.
Comment #3
jibus commentedThanks for your message (long reply i know) ^^
The hook is perfect for this job.