WordPress.org

Ready to get started?Download WordPress

Forums

Social Login
[resolved] show Twitter email (Important) (6 posts)

  1. martinbeasnunez
    Member
    Posted 2 years ago #

    Hello everyone,
    (AWESOME PLUGIN)

    /* My question:
    twitter delivery this type of email:
    645fkdkdfljkfdjk2131ldf@example.com
    is there anyway to get the real mail registered user?

    Thankyou!

    http://wordpress.org/extend/plugins/oa-social-login/

  2. Claude
    Member
    Plugin Author

    Posted 2 years ago #

    Hello,

    unfortunately Twitter does not provide their users' email addresses.
    To streamline the user connection, the plugin thus creates a fake email address.

    If you would like to get the users real email address, you can request the user to enter it manually. Open the Social Login settings and look for the option:

    Some social networks do not provide their user's email. Ask the user to enter it manually in this case?

    Regards,

  3. martinbeasnunez
    Member
    Posted 2 years ago #

    This goes awesome claude!,
    actually was using the previous version of the plugin

    I'm doing interesting things with this plugin
    (in a question and answer site)
    can see an example in

    http://pregunta.pe

    Regards from BuenosAires, argentina

  4. martinbeasnunez
    Member
    Posted 2 years ago #

    I have one last question,
    how do i manage that, for example, the users that had already logged in with their twitter account, and i had their emails: fdsfsdf@example.com
    they try logging in again with an existent account (through twitter) and it didnt resquest the e-mail.

    it worked with the users that logged in the first time

    is there any way of requesting their emails to the ones already registered
    ?

    i really appreciate your answer, thank you!

  5. martinbeasnunez
    Member
    Posted 2 years ago #

    hello ?

  6. Claude
    Member
    Plugin Author

    Posted 2 years ago #

    Hello,

    please try the following change:

    1) Open the plugin file communication.php

    2) Find the following code:

    $user_data = get_userdata ($user_id);
    if ($user_data !== false)
    {

    3) Add this code below:

    if (preg_match ('#example\.com$#i', $user_data->user_email))
    {
     update_user_meta ($user_id, 'oa_social_login_request_email', 1);
    }

    4) It should look like:

    $user_data = get_userdata ($user_id);
    if ($user_data !== false)
    {
     if (preg_match ('#example\.com$#i', $user_data->user_email))
     {
      update_user_meta ($user_id, 'oa_social_login_request_email', 1);
     }

    This change should request the email from user accounts created with a bogues email address. This code has not been tested. Please carefully test it before using it on a production website.

    We will test and officially add the change to one of the next versions.

    Regards,

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic