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
301      } else {
302           $cookie_login = wp_get_cookie_login();
303           if ( ! empty($cookie_login) ) {
304                $using_cookie = true;
305                $user_login = $cookie_login['login'];
306                $user_pass = $cookie_login['password'];
307           }
308      }
309
310      do_action_ref_array('wp_authenticate', array(&$user_login, &$user_pass));
311
312      // If cookies are disabled we can't log in even with a valid user+pass
313      if ( $_POST && empty($_COOKIE[TEST_COOKIE]) )
314           $errors['test_cookie'] = __('<strong>ERROR</strong>: WordPress requires Cookies but your browser does not support them or they are blocked.');
315
316      if ( $user_login && $user_pass && empty( $errors ) ) {
317           $user = new WP_User(0, $user_login);
318
319           // If the user can't edit posts, send them to their profile.