Cannot save via xprofile_set_field_data
-
Hi Christian,
Thank you for this plugin.
I am having problems saving First Name and Last Name using
xprofile_set_field_data
I originally created these two fields myself and was having saving to them as well. I am using the OA Social Login plugin to Sign Up a user using Facebook and then using their hook I am trying to save these Extended Profile Fields. Here is my code:
add_action( 'oa_social_login_action_after_user_insert', 'update_base_user_profile' ); function update_base_user_profile( $user_id, $user_data ) { $user_display_name = $user_data->data->display_name; $temp_user = new WP_User($user_id); $temp_user->remove_role('subscriber'); $temp_dn = explode(' ', $user_display_name); $first_name = $temp_dn[0]; $last_name = $temp_dn[1]; xprofile_set_field_data( 'First Name', $user_id, $first_name ); xprofile_set_field_data( 'Last Name', $user_id, $last_name ); }
Any insight?
https://www.ads-software.com/plugins/bp-xprofile-wp-user-sync/
Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
- The topic ‘Cannot save via xprofile_set_field_data’ is closed to new replies.