Username regex filter

Component ID

2587299

Component name

Username regex filter

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Downloads

448

Component created

Component changed

Component body

This is a very simple module born from the circumstance that there is seemingly no other easy way to apply effective user name restrictions. The only module that would seem to be the right choice (i. e. User restrictions), favors a limited SQL'ish syntax, which feels uncomfortable to regex fans (like I am).

Since this here is a last-resort module, please do not expect any functionality beyond dev level. Your only user interface will be variable_admin to set a regex. If no regex ist set, the module won't interact in the user account form. I will also not add any documentation, since this is a dev module, please understand the - simple, Drupal API based - code. Thanks.

I would really like to see regex merged into User restrictions (and will suggestI have suggested it there). Once this succeeds, this module will be dropped. Please keep this in mind. If you, instead, want it to get big, you will need to help making it so (you are then welcome).

Dependencies

Setup

  1. Enable
  2. Go to admin/config/system/variable/module, look for "username_regex" and edit the value.
  3. Test your regex by creating an account.