Fix notice in APP server if no authentication credentials supplied.

git-svn-id: https://develop.svn.wordpress.org/trunk@11809 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Peter Westwood 2009-08-13 20:11:52 +00:00
parent 04b7cd96b4
commit 19c135e0e6
1 changed files with 6 additions and 6 deletions

View File

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