Relocate wp_authenticate action to fix back compat and make it more useful. fixes #6675 for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@7692 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
cd0641c856
commit
73cdb808d1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user