File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -146,14 +146,21 @@ function top_panel($user, $TAB) {
146146 $ command = HESTIA_CMD ."v-list-user " .escapeshellarg ($ user )." 'json' " ;
147147 exec ($ command , $ output , $ return_var );
148148 if ( $ return_var > 0 ) {
149- echo "<b>ERROR: Unable to retrieve account details.</b><br>Please log in again. " ;
149+ echo "<span style='font-size: 18px;'>< b>ERROR: Unable to retrieve account details.</b><br>Please <b><a href='/login/'> log in</a></b> again.</span> " ;
150150 session_destroy ();
151151 header ("Location: /login/ " );
152152 exit ;
153153 }
154154 $ panel = json_decode (implode ('' , $ output ), true );
155155 unset($ output );
156156
157+ // Log out active sessions for suspended users
158+ if ($ panel [$ user ]['SUSPENDED ' ] === 'yes ' ) {
159+ $ _SESSION ['error_msg ' ] = "You have been logged out. Please log in again. " ;
160+ session_destroy ();
161+ header ("Location: /login/ " );
162+ }
163+
157164 // Load user's selected theme and do not change it when impersonting user
158165 if ( (isset ($ panel [$ user ]['THEME ' ])) && (!isset ($ _SESSION ['look ' ]) )) {
159166 $ _SESSION ['userTheme ' ] = $ panel [$ user ]['THEME ' ];
Original file line number Diff line number Diff line change 1717 </ script >
1818</ head >
1919
20- < body class ="body-<?=strtolower($TAB)?> lang-<?=$_SESSION['language']?> ">
20+ < body class ="body-<?=strtolower($TAB)?> lang-<?=$_SESSION['language']?> "> <!--
2121 <?php if (($_SESSION['DEBUG_MODE']) == "true" ) {?>
2222 <?php require ''.$_SERVER['HESTIA'].'/web/templates/pages/debug_panel.html'; ?>
23- < ?php } ?>
23+ <?php } ?>-->
You can’t perform that action at this time.
0 commit comments