Always wp_authenticate in wp-app. Props wnorris. fixes #9320

git-svn-id: https://develop.svn.wordpress.org/trunk@10771 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-03-11 22:49:30 +00:00
parent 843489a872
commit 642871fbfa

View File

@ -1492,13 +1492,14 @@ EOD;
// If Basic Auth is working... // If Basic Auth is working...
if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) {
log_app("Basic Auth",$_SERVER['PHP_AUTH_USER']); log_app("Basic Auth",$_SERVER['PHP_AUTH_USER']);
}
$user = wp_authenticate($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']); $user = wp_authenticate($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']);
if ( $user && !is_wp_error($user) ) { if ( $user && !is_wp_error($user) ) {
wp_set_current_user($user->ID); wp_set_current_user($user->ID);
log_app("authenticate()", $_SERVER['PHP_AUTH_USER']); log_app("authenticate()", $user->user_login);
return true; return true;
} }
}
return false; return false;
} }