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

View File

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