Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: wp_authenticate

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
299      } else {
300           $cookie_login = wp_get_cookie_login();
301           if ( ! empty($cookie_login) ) {
302                $using_cookie = true;
303                $user_login = $cookie_login['login'];
304                $user_pass = $cookie_login['password'];
305           }
306      }
307
308      do_action_ref_array('wp_authenticate', array(&$user_login, &$user_pass));
309
310      if ( $user_login && $user_pass && empty( $errors ) ) {
311           $user = new WP_User(0, $user_login);
312
313           // If the user can't edit posts, send them to their profile.
314           if ( !$user->has_cap('edit_posts') && ( empty( $redirect_to ) || $redirect_to == 'wp-admin/' ) )
315                $redirect_to = get_option('siteurl') . '/wp-admin/profile.php';
316
317           if ( wp_login($user_login, $user_pass, $using_cookie) ) {