Ver Fonte

Fix system theme enforcement on login

Kristan Kenney há 5 anos atrás
pai
commit
15cedd217c
1 ficheiros alterados com 4 adições e 0 exclusões
  1. 4 0
      web/login/index.php

+ 4 - 0
web/login/index.php

@@ -207,6 +207,10 @@ function authenticate_user($user, $password, $twofa = ''){
 
 
                 // Set active user theme on login
                 // Set active user theme on login
                 $_SESSION['userTheme'] = $data[$user]['THEME'];
                 $_SESSION['userTheme'] = $data[$user]['THEME'];
+                if ($_SESSION['POLICY_USER_CHANGE_THEME'] !== 'yes') {
+                    unset($_SESSION['userTheme']);
+                }
+
                 if (!empty($data[$user]['PREF_UI_SORT'])) {
                 if (!empty($data[$user]['PREF_UI_SORT'])) {
                     $_SESSION['userSortOrder'] = $data[$user]['PREF_UI_SORT'];
                     $_SESSION['userSortOrder'] = $data[$user]['PREF_UI_SORT'];
                 } else {
                 } else {