We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ceb6793 commit 1654c1bCopy full SHA for 1654c1b
web/inc/main.php
@@ -161,6 +161,12 @@ function top_panel($user, $TAB) {
161
header("Location: /login/");
162
}
163
164
+ // Reset user permissions if changed while logged in
165
+ if (($panel[$user]['ROLE']) !== ($_SESSION['userContext']) && (!isset($_SESSION['look']))) {
166
+ unset($_SESSION['userContext']);
167
+ $_SESSION['userContext'] = $panel[$user]['ROLE'];
168
+ }
169
+
170
// Load user's selected theme and do not change it when impersonting user
171
if ( (isset($panel[$user]['THEME'])) && (!isset($_SESSION['look']) )) {
172
$_SESSION['userTheme'] = $panel[$user]['THEME'];
0 commit comments