Relocate wp_authenticate action to fix back compat and make it more useful. fixes #6675 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@7692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-04-16 04:49:19 +00:00
parent ce1fed1a02
commit 82fd123c91
1 changed files with 2 additions and 2 deletions

View File

@ -19,6 +19,8 @@ function wp_signon( $credentials = '' ) {
else else
$credentials['remember'] = false; $credentials['remember'] = false;
do_action_ref_array('wp_authenticate', array(&$credentials['user_login'], &$credentials['user_password']));
// If no credential info provided, check cookie. // If no credential info provided, check cookie.
if ( empty($credentials['user_login']) && empty($credentials['user_password']) ) { if ( empty($credentials['user_login']) && empty($credentials['user_password']) ) {
$user = wp_validate_auth_cookie(); $user = wp_validate_auth_cookie();
@ -42,8 +44,6 @@ function wp_signon( $credentials = '' ) {
return $error; return $error;
} }
do_action_ref_array('wp_authenticate', array(&$credentials['user_login'], &$credentials['user_password']));
$user = wp_authenticate($credentials['user_login'], $credentials['user_password']); $user = wp_authenticate($credentials['user_login'], $credentials['user_password']);
if ( is_wp_error($user) ) if ( is_wp_error($user) )
return $user; return $user;