Merge pull request #4017 from Icinga/fix/external-authentication-3995
Fix external authentication
This commit is contained in:
commit
cc08f7e11a
|
@ -3,7 +3,7 @@
|
|||
</div>
|
||||
<div class="content">
|
||||
<?php foreach ($navigation as $item): /** @var \Icinga\Web\Navigation\NavigationItem $item */?>
|
||||
<a class="dashboard-link" href="<?= $this->url($item->getUrl(), $item->getUrlParameters()) ?>">
|
||||
<a class="dashboard-link" href="<?= $this->url($item->getUrl(), $item->getUrlParameters()) ?>"<?= $this->propertiesToString($item->getAttributes()) ?>>
|
||||
<div class="link-icon">
|
||||
<?= $this->icon($item->getIcon() ?: 'forward', null, array('aria-hidden' => true)) ?>
|
||||
</div>
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue