mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 16:21:26 +01:00
Fix notice in APP server if no authentication credentials supplied.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
468f7aaa14
commit
6fb4ff0ebe
@ -1492,7 +1492,6 @@ 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) ) {
|
||||||
@ -1500,6 +1499,7 @@ EOD;
|
|||||||
log_app("authenticate()", $user->user_login);
|
log_app("authenticate()", $user->user_login);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user