vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Unique Email Addresses (https://vborg.vbsupport.ru/showthread.php?t=288855)

Oclamora 10-09-2012 08:42 PM

Unique Email Addresses
 
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...
PHP Code:

$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!


All times are GMT. The time now is 08:09 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00942 seconds
  • Memory Usage 1,714KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete