By seth.vincent on
How can I require new users to use a certain email domain? I need to verify that all users of this website that receive a role with certain privileges already are a part of this organization, and it seems like the easiest way to do this would be to require that people 1) use the organization email system, and 2) use that email for registration on the Drupal site. I'm just not really familiar with how to set that requirement up.
Any help would really make my day.
seth
Comments
Write a tiny module...
...that uses hook_form_alter to specify a custom validation function for the email field of the registration form.
Figured it out
What's needed is simple:
Home › Administer › User management › Access rules
Make one rule that denies email addresses of any kind: the mask would be %@%
Next counter that with a rule that allows email addresses from the desired domain. The mask would look like this: %@example.com
simple things are neat.
Yep, that's a better
Yep, that's a better solution than mine ^_^
Thank you!! This is what I
Thank you!! This is what I needed as well.
---------------------------------------------------
Michelle Lauer
michellelauer.com
Can this be done in a
Can this be done in a non-reversible way? i.e. Can the user be assigned a role that persists even after he changes his email?