I'm looking for a module that restricts the allowed username (during registration and username change) based on a list of words.

For example, I want the username to check against a list of expletive words so that users can't sign up using those words.

I've been looking but I can't find any module that does this.

Anyone?

thanks!

Comments

yelvington’s picture

You don't need a module. It's standard Drupal. admin/user/rules.

jng12’s picture

didn't even know that.

Problem is, I already have a list of 100 or so words, is it one word / rule?

thanks.

drupalfan81’s picture

I'm aware of the admin/user/rules, but does anyone know of a way to restrict the type of username only during registration so that admin/moderator users can still use those words in the username by manually changing the user's name.

For example, if I'm an admin and I want to allow a particular username to be used, I can change it on the user's profile page, but then if that name exist in the access user rules, they will be blocked when they attempt to log into Drupal. This seems a bit silly. So basically the access rules built in module checks the username upon login, not only upon user registration.

So what happened was that I changed my admin user account's username to include the word that I restricted in the access rules. I could change it no problem, but then upon logging in the next time, I was not allowed. Not good seeing that it's my admin account.

So I needed to manually edit the DB value of the access rules so that I could log in again and then delete the rule.

How can I only restrict the use of the name at user creation so that my admins can still go in and use those words in their username?

Thank you!