I update user info using wp_update_user
function. I also need to update the table wp_bp_xprofile_data
. Is there any function, where I can update data on wp_bp_xprofile_data
table?
1 Answer
This is how I would update a field named ‘Address’:
function updateAddress() {
global $current_user;
get_currentuserinfo();
$newAddress="123 New Street";
xprofile_set_field_data('Address', $current_user->id, $newAddress);
}