mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Always wp_authenticate in wp-app. Props wnorris. fixes #9320
git-svn-id: http://svn.automattic.com/wordpress/trunk@10771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c569b75494
commit
53cb41fc3c
13
wp-app.php
13
wp-app.php
@ -1492,12 +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()", $_SERVER['PHP_AUTH_USER']);
|
||||
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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user