]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Unnecessary to check PHP_AUTH_USER here
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 10 Nov 2014 11:10:21 +0000 (12:10 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 10 Nov 2014 11:10:21 +0000 (12:10 +0100)
it was implied from $this->auth_user_nickname above

lib/apiauthaction.php

index a7b212d79ad55a1913ab12a7828b195589ceb1b2..0a1e0b8e245afe792755187b1bee50eba6c9b896 100644 (file)
@@ -290,6 +290,7 @@ class ApiAuthAction extends ApiAction
             $this->clientError(_('Could not authenticate you.'), 401);
 
         } elseif ($required) {
+            // $this->auth_user_nickname - i.e. PHP_AUTH_USER - will have a value since it was not empty
 
             $user = common_check_user($this->auth_user_nickname,
                                       $this->auth_user_password);
@@ -310,7 +311,7 @@ class ApiAuthAction extends ApiAction
             // By default, basic auth users have rw access
             $this->access = self::READ_WRITE;
 
-            if (!$this->auth_user instanceof User && isset($_SERVER['PHP_AUTH_USER'])) {
+            if (!$this->auth_user instanceof User) {
                 $msg = sprintf(
                     "basic auth nickname = %s",
                     $this->auth_user_nickname