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
379           $user->yim = wp_specialchars(trim($_POST['yim']));
380
381      $errors = array ();
382
383      /* checking that username has been typed */
384      if ($user->user_login == '')
385           $errors['user_login'] = __('<strong>ERROR</strong>: Please enter a username.');
386
387      /* checking the password has been typed twice */
388      do_action('check_passwords', array ($user->user_login, & $pass1, & $pass2));
389
390      if (!$update) {
391           if ($pass1 == '' || $pass2 == '')
392                $errors['pass'] = __('<strong>ERROR</strong>: Please enter your password twice.');
393      } else {
394           if ((empty ($pass1) && !empty ($pass2)) || (empty ($pass2) && !empty ($pass1)))
395                $errors['pass'] = __("<strong>ERROR</strong>: you typed your new password only once.");
396      }
397