Skip to content

Commit 1c0214d

Browse files
author
Kristan Kenney
committed
Prevent standard users from viewing user list
1 parent 1f3692e commit 1c0214d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

web/list/user/index.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
// Main include
66
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
77

8+
// Do not show the users list for regular users
9+
if ($_SESSION['userContext'] === 'user') {
10+
header("Location: /login/");
11+
exit;
12+
}
13+
814
// Do not show the users list if user is impersonating another user
915
if (isset($_SESSION['look'])) {
1016
header("Location: /login/");

0 commit comments

Comments
 (0)