Unnecessary to check PHP_AUTH_USER here

it was implied from $this->auth_user_nickname above
This commit is contained in:
Mikael Nordfeldth 2014-11-10 12:10:21 +01:00
parent 17647dc3ff
commit b6a168c82e
1 changed files with 2 additions and 1 deletions

View 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