Skip to content

Commit cbf491e

Browse files
author
Kristan Kenney
committed
Ensure correct theme loads
1 parent 3579612 commit cbf491e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

web/inc/main.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@
9393
$user = $_SESSION['user'];
9494
}
9595

96+
if (isset($panel[$user]['THEME'])) {
97+
$_SESSION['userTheme'] = $panel[$user]['THEME'];
98+
}
99+
96100
if (isset($_SESSION['look']) && ($_SESSION['userContext'] === 'admin')) {
97101
$user = $_SESSION['look'];
98102
}
@@ -158,9 +162,6 @@ function top_panel($user, $TAB) {
158162
$panel = json_decode(implode('', $output), true);
159163
unset($output);
160164

161-
unset($_SESSION['userTheme']);
162-
$_SESSION['userTheme'] = $panel[$user]['THEME'];
163-
164165
// Set home location URLs
165166
if (($_SESSION['userContext'] === 'admin') && (!isset($_SESSION['look']))) {
166167
// Display users list for administrators unless they are impersonating a user account

0 commit comments

Comments
 (0)