diff options
author | Simon Rettberg | 2022-09-30 15:25:05 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-09-30 15:25:05 +0200 |
commit | 6cc08370fc7314876d48eb1339451b16e7ccdc25 (patch) | |
tree | 68c7017eca9e71caf34d8d027aa18118c46fa903 /modules-available | |
parent | [locationinfo] Disable shutdown timeout if autologin is enabled (diff) | |
download | slx-admin-6cc08370fc7314876d48eb1339451b16e7ccdc25.tar.gz slx-admin-6cc08370fc7314876d48eb1339451b16e7ccdc25.tar.xz slx-admin-6cc08370fc7314876d48eb1339451b16e7ccdc25.zip |
[locationinfo] Proper handling/setting auf SLX_AUTOLOGIN
Enabled should be 'ON', not '1' (even though 1 works for now)
Diffstat (limited to 'modules-available')
-rw-r--r-- | modules-available/locationinfo/inc/locationinfohooks.inc.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules-available/locationinfo/inc/locationinfohooks.inc.php b/modules-available/locationinfo/inc/locationinfohooks.inc.php index 5b3e2506..9f8a27dd 100644 --- a/modules-available/locationinfo/inc/locationinfohooks.inc.php +++ b/modules-available/locationinfo/inc/locationinfohooks.inc.php @@ -51,7 +51,7 @@ class LocationInfoHooks RunMode::updateClientFlag($machineUuid, 'locationinfo', true); } else { // Automatic login RunMode::updateClientFlag($machineUuid, 'locationinfo', false); - ConfigHolder::add('SLX_AUTOLOGIN', '1', 1000); + ConfigHolder::add('SLX_AUTOLOGIN', 'ON', 1000); ConfigHolder::add('SLX_ADDONS', '', 1000); } if (!empty($data['browser'])) { @@ -75,10 +75,11 @@ class LocationInfoHooks } else { // Not URL panel ConfigHolder::add('SLX_BROWSER_URL', 'http://' . $_SERVER['SERVER_ADDR'] . '/panel/' . $panelUuid); - ConfigHolder::add('SLX_AUTOLOGIN', '1', 1000); + ConfigHolder::add('SLX_AUTOLOGIN', 'ON', 1000); ConfigHolder::add('SLX_ADDONS', '', 1000); } - if (ConfigHolder::get('SLX_AUTOLOGIN')) { + $al = ConfigHolder::get('SLX_AUTOLOGIN'); + if (!empty($al) && $al !== 'OFF' && $al != 0) { ConfigHolder::add('SLX_SHUTDOWN_TIMEOUT', '', 1000); } ConfigHolder::add('SLX_LOGOUT_TIMEOUT', '', 1000); |