Social login | BUG & SOLUTION | gmail doesn't care about dot (period)

My fb account has tomas.anderson@gmail.com; my google account has tomasanderson@gmail.com. They're one gmail account only, but for Oneall are 2.

Suggestion 1, new function:

function clean_gmail_address ($user_email) {
if (preg_match('/(.*)@gmail.;com$/i', trim($user_email), $matches)) {
$user_email = str_replace('.', '', $matches[1]).'@gmail.com';
}
return $user_email;
}

Suggestion 2, use it in oa-social-login/includes/communication.php (oa_social_login_callback, line 180)

$user_email = clean_gmail_address($user_email);

Answers

  • Claude_SchlesserClaude_SchlesserAdministratorOneAll Team
    edited April 1

    Hi Andrea,

    technically speaking tomas.anderson@gmail.com and tomasanderson@gmail.com are two different email addresses. Removing the dots might merge accounts that are actually not related.

    Let's say I create this email: tomas.and.erson@gmail.com
    If the plugin would remove the dots, then it might merge my account and yours.

Sign In or Register to comment.