Log in

View Full Version : Checking Email on Registration


FatalBreeze
05-27-2007, 08:29 PM
When users are registered to my forum, i want to make sure they don't user certain email suppliers, in order to check this, i need to run some functions on the $vbulletin->GPC['email'] on registration. The problem is that the only hook there is "register_addmember_process" and it appears only after the email is validated and checked: $userdata->set('email', $vbulletin->GPC['email']);
My question is, can i add a query on that hook like this:

if(strstr($vbulletin->GPC['email'],...)) {
$userdata->error('someerror');
}

after the email is saved? or do i have to edit the file itself?
Thanks!

Dismounted
05-28-2007, 05:47 AM
Isn't checking email domains a standard vBulletin feature?

FatalBreeze
05-28-2007, 06:16 AM
well, according to what i'm reading in the "addmember" part, id doesn't. anyhow, i still need to add some code because there are 2 specific domains i don't want users to register with.

Dismounted
05-28-2007, 07:16 AM
vBulletin Options > User Banning Options > Banned Email Addresses
Email address ban lists: You may ban any email addresses from registering and posting. Type in the complete email address (user@example.com), or use a partial email address (as in @example.com).

Note that partial email addresses are matched from the end of the address unless you enable "Aggressive Email Banning" below. Therefore if you ban @example.com you will ban user@example.com, but if you ban @example that user will not be banned. If you enable "Aggressive Email Banning", user@example.com would be banned by @example.

If the email address of a user attempting to register or change their email address matches any of the addresses you specify here will see a no-permission error. For example, if you have banned 'example.com' then a user attempting to use 'someone@example.com' will be rejected.

Put a space between each email address or email address fragment.

FatalBreeze
05-28-2007, 08:24 AM
oops... stupid me... lol
thanks dismounted! :)