Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_login

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
73                $error->add('empty_password', __('<strong>ERROR</strong>: The password field is empty.'));
74           return $error;
75      }
77      $user = wp_authenticate($credentials['user_login'], $credentials['user_password']);
78      if ( is_wp_error($user) )
79           return $user;
81      wp_set_auth_cookie($user->ID, $credentials['remember'], $secure_cookie);
82      do_action('wp_login', $credentials['user_login']);
83      return $user;
84 }
86 /**
87  * Retrieve user data based on field.
88  *
89  * Use get_profile() will make a database query to get the value of the table
90  * column. The value might be cached using the query cache, but care should be
91  * taken when using the function to not make a lot of queries for retrieving