PDA

View Full Version : Restricting Forum Registration


bbi
07-18-2011, 09:02 PM
Is it possible to restrict who may join your forum based on their email address extension? I am trying to limit access to only those people who belong to a specific insitution.
Thanks

Eric
07-18-2011, 09:19 PM
It is possible. I thought I saw a mod for it here but I cannot seem to find it atm. You could make a plugin to block certain extensions/domains.

This has not been tested, but something like:

Hook location: register_addmember_process
PHP Code:

$emailcheck = @explode('@', $vbulletin->GPC['email']);
$emailcheck = $emailcheck[1];

if (strpos($emailcheck, 'domain.edu') === false)
{
$userdata->error('invalidemail');
}

bbi
07-18-2011, 10:38 PM
If we have more than one institution that we want to restict the forum to then I assume we would have to include the list of institution's email extensions in the conditional statement. Is that correct?

HMBeaty
07-19-2011, 12:14 AM
If we have more than one institution that we want to restict the forum to then I assume we would have to include the list of institution's email extensions in the conditional statement. Is that correct?
Yes, that would be correct