Fires after all XProfile fields have been saved for the current profile.


do_action( 'xprofile_updated_profile', (int) $user_id, (array) $posted_field_ids, (bool) $errors, (array) $old_values, (array) $new_values ); 

Parameters (5)

0. $user_id (int)
ID for the user whose profile is being saved.
1. $posted_field_ids (array)
Array of field IDs that were edited.
2. $errors (bool)
Whether or not any errors occurred.
3. $old_values (array)
Array of original values before update.
4. $new_values (array)
Array of newly saved values after update.


To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'xprofile_updated_profile', $user_id, $posted_field_ids, $errors, $old_values, $new_values ); 
The following example is for adding a hook callback.
  1. // define the xprofile_updated_profile callback 
  2. function action_xprofile_updated_profile( $user_id, $posted_field_ids, $errors, $old_values, $new_values ) { 
  3. // make action magic happen here... 
  4. }; 
  6. // add the action 
  7. add_action( 'xprofile_updated_profile', 'action_xprofile_updated_profile', 10, 5 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'xprofile_updated_profile', 'action_xprofile_updated_profile', 10, 5 ); 

Defined (2)

The action is defined in the following location(s).

  1. do_action( 'xprofile_updated_profile', $user_id, $posted_field_ids, $errors, $old_values, $new_values ); 
  1. do_action( 'xprofile_updated_profile', bp_displayed_user_id(), $posted_field_ids, $errors, $old_values, $new_values );