Restrict drupal user registration to specific email domain.

By: admin

3 May 2011

There are many modules  for allowing user to register and login by email address. One of those is Email registration.
But what when you want to allow or restrict the email registration by specific domain ?
A easy workaround without depending on any contributed module is by using  " Access Rules "

 Add the following e-mail rules:

  • Deny %@% (which blocks all e-mail addressess)
  • Allow %@yourdomain.com

Sometimes task which seems to be difficult are very easy :P

4 Responses to Restrict drupal user registration to specific email domain.

Dan (not verified)

Tuesday, June 21, 2011 - 21:02   reply 

This is just what I was looking for. Such a simple solution to what seemed like a complex problem. I'm putting together a site in which we only want employees to create accounts. Email is the only way to do it and this just solved the problem of having to write custom code. Thanks.

Dan

admin's picture

admin

Wednesday, June 22, 2011 - 10:25   reply 

Yes, that seems to be complex problem with an simple solution.

Micah (not verified)

Wednesday, September 14, 2011 - 18:17   reply 

Works exactly as described. Thanks.
Micah

admin's picture

admin

Saturday, September 17, 2011 - 14:57   reply 

Glad it worked for you :)

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

7 + 13 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

php.png    firefox.png    open_source.png    ubuntu.png    drupal.png    civicrm.png     jquery

About the Author

admin's picture

About Me

I am : Open source developer.

I love : Drupal & CiviCRM !!

Work : Consultant @ Capgemini

Recent comments

Follow Me

flickr.png    yahoo.png    facebook.png    twitter.png

google.png    youtube.png    wordpress.png   

       wordpress.png

Ohloh profile for rahulbile

User login