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?
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
Answers
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);
Indeed, the picture does not get uploaded.
Is there any other plugin which may interfere? (Our plugin relies on the get_avatar filter.)
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?