Drupal let you set access rules for new and existing accounts (Administer → User management → Access rules).

This is almost what I am looking for, but I only want to do this for new accounts (registrations) without affecting existing accounts. Is there something that let me do this?

Background: My site get a lot of registration attempts from spammers. Naturally I don't want this, so currently the site is set up so that I have to approve every single new registration. This is a waste of time. What I want is to impose registration rules, so that only users with an email address belonging to my organization are allowed to register. The present Access rules let me do this.

However, some of our users want to have external email addresses linked to their user accounts. The present Access rules will deny these users access as soon as they change their email address to an external one, unless I put in explicit "allow" rules for them.

I want to impose restrictions on what email address you are allowed to use when you first register, but after someone has succesfully registered, they should be free to change their email address. Is there something that let me do this?

Comments

scubasmurf’s picture

What about using .htaccess to redirect all who attempt to access http://www.example.com/user/register from outside of your organizations IP range. Basically they would have to be in the office to register.

Or you could build a new user registration form that tested or forced or rewrote the email domain, include text to advise that users need to first register with their organization email address, then turn off Access Rules.

Or just use the The CAPTCHA module (I prefer reCAPTCHA) for registrations and enable "Visitors can create accounts but administrator approval is required." That will take care of the spam problem and if you do not have that many users registering then may be enough of a solution by itself.

Anne-Pierre’s picture

The field should be invisible to real people, but machines will fill it in. Then with rules you can easily delete the machine created account.