Hi, I'm setting up a moodle site where in users with EDU or edu associated subdomains only can register on the site and if any one else with different email ID like gmail.com / rediffmail.com / yahoo.com register, the amember should not allow to register. Can any one help me in this regard to allow only edu registrations. Also I need to enter below on the site where you enter Your E-Mail Address *
To change email field title and description you should edit /amember/language/en.php : PHP: define ('_TPL_SIGNUP_EMAIL', 'Your E-Mail Address');define ('_TPL_SIGNUP_EMAIL_1', 'A confirmation email will be sent');define ('_TPL_SIGNUP_EMAIL_2', 'to you at this address'); Then add this code to /amember/site.inc.php: PHP: <?php setup_plugin_hook("validate_signup_form", "check_edu_email"); function check_edu_email($vars){if(!preg_match("/\.edu$/", $vars[email]))$errors[] = "We allow to signup only from .edu emails";return $errors;}?>
Hmm.. this sounds like a good opportunity for a plugin I'll add it to the list and release a free plugin that does this as well in a few weeks that will add an admin config to allow or reject specified domains.