View Full Version : Unique Email Addresses
Oclamora
10-09-2012, 08:42 PM
Hi there,
The system recognizes "example@gmail.com", "e.xample@gmail.com", "e.x.ample@gmail.com", "exam.ple@gmail.com", etc... as different addresses were in fact they are all the same. Is there a way, using regex or any other way, to tell the system that they are all the same?
Thanks!
nhawk
10-09-2012, 09:55 PM
Dots in email addresses are legitimate on most systems.
The fact that gmail removes the dots and considers them the same email address is more of a bug than anything else.
To detect gmail addresses with dots, you can create a plugin using the 'register_addmember_process' hook. Use this PHP code to remove the dots from the gmail addresses...
$email_parts = explode('@',$vbulletin->GPC['email']);
if(stristr($email_parts[1],'gmail'))
{
$email_parts[0] = str_replace('.','',$email_parts[0]);
$whole_email = $email_parts[0] . '@' . $email_parts[1];
$userdata->set('email', $whole_email);
}
Again, don't use that for ALL email addresses because a dot in the address is allowed on most mail systems.
Oclamora
10-12-2012, 08:30 PM
Hey nhawk,
Thank you for the code and the explanation!
I'm aware that the dot matters to some systems and not others; however, the vB system should feature an option to activate and deactivate things like this. This will be very helpful with reducing spams, I think.
All the best!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.