How may I store Basic Profile data retrieved from a social network profile in wordpress?

Hi, how may i store the following data in my wordpress database and display same in the user's personal profile page?
  1. First Name
  2. Middle Name
  3. Last Name
  4. Email Address (Verified)

  5. Preferred Username
  6. Profile URL
  7. Profile Picture
I can login but it apears my profile pic is not been displayed and other data are not saved in my profile page.
Thanks

Answers

  • Hi,
    Some of these fields should already be available (but need to be enabled via the plugin's configuration): email, profile picture, profile url.
    What is your site URL?

    Others may not be: first name, last name because these fields may not be present, and of the way they are mapped.
    For this, you can use the profile data, and correct the mappings:
    support.oneall.com/forums/discussion/comment/4739/#Comment_4739

    Also, you can store extended data with this hook:
    //Handle data retrieved from a social network profile function oa_social_login_store_extended_data ($user_data, $identity) { // $user_data is an object that represents the newly added user // The format is similar to the data returned by $user_data = get_userdata ($user_id); // $identity is an object that contains the full social network profile //Example to store the gender update_user_meta ($user_data->id, 'gender', $identity->gender); } //This action is called whenever Social Login adds a new user add_action ('oa_social_login_action_after_user_insert', 'oa_social_login_store_extended_data', 10, 2);
  • OK just test again and all data are correctly displayed in user profile page except the gender and profile pic, even though i have configured that, 'yes use small avatars from social networks if available'. THe function in your solution above should fix updating the gender, but what about the profile pic. THis is my site login page https://www.kobopulse.com/wp-login.php
  • Hi,
    Indeed, the picture does not get uploaded.
    Is there any other plugin which may interfere? (Our plugin relies on the get_avatar filter.)
  • Hi,
    How I can extend the structure of WP database to store additional data retrieved from a social network profile?
    (http://docs.oneall.com/plugins/guide/social-login-wordpress/)

    When I need to do it?

Welcome!

Please sign in to your OneAll account to ask a new question or to contribute to the discussions.

Please click on the link below to connect to the forum with your OneAll account.