do_action_ref_array( 'user_profile_update_errors', array
( &
$errors,
$update, &
$user ) );
if ( $errors->
has_errors() ) { return $errors;
} if ( $update ) { $user_id =
wp_update_user( $user );
} else { $user_id =
wp_insert_user( $user );
$notify =
isset( $_POST['send_user_notification'
] ) ? 'both' : 'admin';
/**
* Fires after a new user has been created.
*
* @since 4.4.0
*
* @param int|WP_Error $user_id ID of the newly created user or WP_Error on failure.
* @param string $notify Type of notification that should happen. See
* wp_send_new_user_notifications() for more information.
*/