wphooks.info - user_profile_update_errors

user_profile_update_errors

The hook occurs in the following file:

wp-admin/includes/user.php:
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
	/**
	 * Fires before user profile update errors are returned.
	 *
	 * @since 2.8.0
	 *
	 * @param WP_Error &$errors WP_Error object, passed by reference.
	 * @param bool     $update  Whether this is a user update.
	 * @param stdClass &$user   User object, passed by reference.
	 */
	do_action_ref_array( 'user_profile_update_errors', array( &$errors, $update, &$user ) );

	if ( $errors->get_error_codes() )
		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';