Wednesday, July 6, 2011

How to block certain username or email or IP Address while registering?

We can achieve this logic by writing the Access rules in the drupal admin.

Under User Management we have Access Rules menu.
We can block the username or email with certain keywords, for example if we want to disallow the username called admin, we can write the rule as,

Select Access type as Deny,
Rule Type as Username
and Mask as %admin% which will prevent the user from typing as admin as the user name.
ex: 49admin, admin34, testadmin, webadmin232, etc..........

If we want to disallow exactly one character either by prefix or suffix of the given keyword we can write the rule as _admin or admin_.

No comments:

Post a Comment