By carrer on
Hi
Is it possible to only let users with an email address from a certain organisation, eg. a university, register in drupal 6.
I tried to use the "pre-approved" module in connection with "verify email" module.
Any help?
Hi
Is it possible to only let users with an email address from a certain organisation, eg. a university, register in drupal 6.
I tried to use the "pre-approved" module in connection with "verify email" module.
Any help?
Comments
Hi, You don't need contrib
Hi,
You don't need contrib modules to do this. It's built into core.
Read about access rules
http://drupal.org/getting-started/6/admin/user/rules
The Drupal 5 version of this page describes the rules slightly better:
http://drupal.org/node/107557
access rules
i understood how to allow %@mydomain.net. But how do deny %@allotherdomains.com?
Thanks,
Nils
As in the example on
As in the example on http://drupal.org/node/107557, you can 1st create a rule to deny all email addresses:
Then another rule to allow email from particular domain:
Admin approval for all except certain domain
I've searched around quite a bit including the hacks on register pre approved module, but I can't see how to allow users from a certain domain, say @cooldomain.com to register without approval and then have others have to be approved by admin. Seems like a not so loopy feature to want in a website? Anyone been able to pull this one off?
email domain access rules approval
I think in one of the site configuration menus you set it to require or not require approval. Perhaps you could create a rule using the rules module so that if the domain matches it does not need admin approval.
webform
Just use the webform module, add some custom php to the _validate textarea to check for a substring match of your domain from your email form field, and add a form set error to prevent submission.
Since people are sure to ask
Since people are sure to ask this question about Drupal 7...
Access Rules has been removed from Core in D7. It looks like it will (eventually) be provided in the User Restrictions contrib module:
http://drupal.org/project/user_restrictions
Thanks for the heads up. Good
Thanks for the heads up. Good to know.
subscribing
subscribing
JD Leonard
https://www.jdleonard.net/austin-texas-drupal-consultant-developer
Will setting the allow to
Will setting the allow to "%.edu" work - meaning it checks for ".edu" not necessarily "@something.edu"?
Thanks
Will, it seemed to work for
Will, it seemed to work for since I locked myself out! Talk about taking one for the team...
Hehe. Simple phpMyAdmin fixed that, but yes, it seems to work flawlessly. :.)
Glad to know the technique
Glad to know the technique works. I'll try it soon.
In the event I lock myself out, could you please detail the PHPMyAdmin steps needed to get back in?
Cheers.
Wolf22, in the case I do what
Wolf22, in the case I do what you did and lock myself out, could you tell what PHPMyAdmin steps you took to regain access.
Also, I am assuming that if you make access rules, it is impossible to deny access/lock out the site admin (user 1), correct?
Stomper, I'm sorry I didn't
Stomper, I'm sorry I didn't reply sooner. I don't normally float around here that often due to work and school, but basically I found my user record in the main user table and simply changed my e-mail address. When I was back in, I was able to change everything henceforth through the normal backend.
No worries, I ended up
No worries, I ended up locking myself out (user 1) but was able to delete the rules from the DB using PHPmyAdmin. Not difficult at all.
I just wonder why Drupal would allow rules that would lock out the admin/user 1. Seems a little odd. For someone administering a Drupal website and not knowing what to do, being locked out as the admin can be stressful.
For Drupal 7, there is a dedicated module for this
http://drupal.org/project/useremaildomain
User Email Domain is easier to use because it is simpler than User Restrictions
benjamin, Agaric