Am able to use the following function POST registration.
But would like to achieve same ON registration.
So just a visit to the edit profile tab triggers the function below.
function copyUserMeta() {
global $current_user;
get_currentuserinfo();
$user_id = $current_user->ID;
$firstname = xprofile_get_field_data( "First Name" ,$user_id);
update_user_meta( $user_id, 'first_name',$firstname);
}
add_action('bp_before_profile_edit_content', 'copyUserMeta');`
So CHANGES to the profile fields are reflected in the usermeta.
But would like also to have the fields copied to usermeta ON registration.
Had been using successfully a solution shown at http://buddypress.org/support/topic/xprofile-vs-usermeta-syncing-problems/ (with add_action( 'wpmu_activate_user', 'synchro_wp_usermeta', 10, 3);), but for some reason it no longer functions.
A potential workaround could be on first login go/redirect to members/userxprofile/edit/group/1/, though I would prefer the straightforward copy profile fields to usermeta on registration.
There is also a function add_user_meta()?
Background:- can/will research, can/will follow instructions but quite limited at coding. At the moment doing this on local installs.
Ideas, potential solutions very very welcome?