From: Mikael Nordfeldth Date: Mon, 10 Nov 2014 11:10:21 +0000 (+0100) Subject: Unnecessary to check PHP_AUTH_USER here X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b6a168c82ead59a8b589a090b32b6d337205a5b5;p=quix0rs-gnu-social.git Unnecessary to check PHP_AUTH_USER here it was implied from $this->auth_user_nickname above --- diff --git a/lib/apiauthaction.php b/lib/apiauthaction.php index a7b212d79a..0a1e0b8e24 100644 --- a/lib/apiauthaction.php +++ b/lib/apiauthaction.php @@ -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