PoracleWeb icon indicating copy to clipboard operation
PoracleWeb copied to clipboard

Admin users unable to see user profile when user is admin_disabled.

Open jepke opened this issue 3 years ago • 0 comments

index d8cbbf2..5e6d12b 100644
--- a/header.php
+++ b/header.php
@@ -154,10 +154,9 @@ if (isset($_SESSION['username'])) {
     } else {
             $redirect_page = "unregistered.php";
     }
-
-    if (isset($enable_admin_dis) && $enable_admin_dis == "False" && $_SESSION['id'] <> $_SESSION['admin_id'])
+    if ((isset($enable_admin_dis) && $enable_admin_dis == "False") && !$_SESSION['poracle_admin'])
     {
-           $subs_clause .= " AND admin_disable = 0";
+           $subs_clause = " AND admin_disable = 0";
     }

     $sql = "SELECT * from humans WHERE id = '" . $_SESSION['id'] . "' ".@$subs_clause;

jepke avatar Apr 03 '22 21:04 jepke