Skip to content

Commit 99a28eb

Browse files
author
Kristan Kenney
committed
Set correct theme on login
1 parent 0d1ed01 commit 99a28eb

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

web/login/index.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,12 @@ function authenticate_user($user, $password, $twofa = ''){
184184
$_SESSION['LAST_ACTIVITY'] = time();
185185
$_SESSION['MURMUR'] = $_POST['murmur'];
186186

187+
// Define user role / context
187188
$_SESSION['userContext'] = $data[$user]['ROLE'];
188189

190+
// Set active user theme on login
191+
$_SESSION['userTheme'] = $data[$user]['THEME'];
192+
189193
// Define language
190194
$output = '';
191195
exec (HESTIA_CMD."v-list-sys-languages json", $output, $return_var);

web/logout/index.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
header("Location: /");
1414
} else {
1515
if($_SESSION['token'] && $_SESSION['user']){
16+
unset($_SESSION['userTheme']);
1617
$v_user = escapeshellarg($_SESSION['user']);
1718
$v_session_id = escapeshellarg($_SESSION['token']);
1819
exec(HESTIA_CMD."v-log-user-logout ".$v_user." ".$v_session_id, $output, $return_var);

0 commit comments

Comments
 (0)