diff --git a/library/Icinga/Authentication/User/ExternalBackend.php b/library/Icinga/Authentication/User/ExternalBackend.php index a6159818a..6e79928ae 100644 --- a/library/Icinga/Authentication/User/ExternalBackend.php +++ b/library/Icinga/Authentication/User/ExternalBackend.php @@ -70,11 +70,11 @@ class ExternalBackend implements UserBackendInterface public static function getRemoteUser($variable = 'REMOTE_USER') { $username = getenv($variable); - if ($username !== false) { + if (! empty($username)) { return $username; } - if (array_key_exists($variable, $_SERVER)) { + if (array_key_exists($variable, $_SERVER) && ! empty($_SERVER[$variable])) { return $_SERVER[$variable]; } }