Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: check_passwords

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
517           $user->rich_editing = 'false';
518
519      $errors = new WP_Error();
520
521      /* checking that username has been typed */
522      if ( $user->user_login == '' )
523           $errors->add( 'user_login', __( '<strong>ERROR</strong>: Please enter a username.' ));
524
525      /* checking the password has been typed twice */
526      do_action_ref_array( 'check_passwords', array ( $user->user_login, & $pass1, & $pass2 ));
527
528      if (!$update ) {
529           if ( $pass1 == '' || $pass2 == '' )
530                $errors->add( 'pass', __( '<strong>ERROR</strong>: Please enter your password twice.' ));
531      } else {
532           if ((empty ( $pass1 ) && !empty ( $pass2 ) ) || (empty ( $pass2 ) && !empty ( $pass1 ) ) )
533                $errors->add( 'pass', __( "<strong>ERROR</strong>: you typed your new password only once." ));
534      }
535