From 642871fbfa96b58e51a2d21f9770b7babbada527 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 11 Mar 2009 22:49:30 +0000 Subject: [PATCH] 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 --- wp-app.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/wp-app.php b/wp-app.php index e913286f04..29994e43e1 100644 --- a/wp-app.php +++ b/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;