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
31      $user_firstname = wp_specialchars(trim($_POST['firstname']));
32      $user_lastname  = wp_specialchars(trim($_POST['lastname']));
33      $user_uri       = wp_specialchars(trim($_POST['uri']));
35      /* checking that username has been typed */
36      if ($user_login == '')
37           die (__('<strong>ERROR</strong>: Please enter a username.'));
39      /* checking the password has been typed twice */
40      do_action('check_passwords', array($user_login, &$pass1, &$pass2));
41      if ($pass1 == '' || $pass2 == '')
42           die (__('<strong>ERROR</strong>: Please enter your password twice.'));
44      /* checking the password has been typed twice the same */
45      if ($pass1 != $pass2)
46           die (__('<strong>ERROR</strong>: Please type the same password in the two password fields.'));
48      $user_nickname = $user_login;