Action
rpress_pre_update_user_profile
On this page
Fires before a customer's profile is updated from the profile editor.
Runs in rpress_process_profile_editor_updates() after the nonce and pending-verification checks pass, but before password and user data are saved. Use it to validate or log changes. The user data array contains ID, first_name, last_name, display_name and user_email.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$user_id | int | ID of the user being updated. |
$userdata | array | User fields to be saved: ID, first_name, last_name, display_name, user_email. |
Example#
function my_log_profile_update( $user_id, $userdata ) {
error_log( sprintf( 'Profile update for user %d (%s)', $user_id, $userdata['user_email'] ) );
}
add_action( 'rpress_pre_update_user_profile', 'my_log_profile_update', 10, 2 );
Notes#
The address fields submitted with the form are not included in $userdata.
Source#
Fired from:
includes/shortcodes.php(line 63), inrpress_process_profile_editor_updates()
See also#
Was this page helpful?
