mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-30 09:14:08 +02:00
ExternalBackendForm: set default username envvar explicitly
refs #12164
This commit is contained in:
parent
d9330486e9
commit
846f8ec3d8
@ -57,11 +57,17 @@ class ExternalBackendForm extends Form
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$hasRemoteUser = false;
|
||||||
foreach (ExternalBackend::$remoteUserEnvvars as $envvar) {
|
foreach (ExternalBackend::$remoteUserEnvvars as $envvar) {
|
||||||
if (ExternalBackend::getRemoteUser($envvar) !== null) {
|
if (ExternalBackend::getRemoteUser($envvar) !== null) {
|
||||||
|
$hasRemoteUser = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (! $hasRemoteUser) {
|
||||||
|
$envvar = 'REMOTE_USER';
|
||||||
|
}
|
||||||
|
|
||||||
$this->addElement(
|
$this->addElement(
|
||||||
'text',
|
'text',
|
||||||
'username_envvar',
|
'username_envvar',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user