Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: user_profile_update_errors

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
211      /**
212       * Fires before user profile update errors are returned.
213       *
214       * @since 2.8.0
215       *
216       * @param WP_Error $errors WP_Error object (passed by reference).
217       * @param bool     $update Whether this is a user update.
218       * @param stdClass $user   User object (passed by reference).
219       */
220      do_action_ref_array( 'user_profile_update_errors', array( &$errors, $update, &$user ) );
221
222      if ( $errors->has_errors() ) {
223           return $errors;
224      }
225
226      if ( $update ) {
227           $user_id = wp_update_user( $user );
228      } else {
229           $user_id = wp_insert_user( $user );