From 965c16c19d372ee4032f009a1834403042976b4e Mon Sep 17 00:00:00 2001 From: johnnyq Date: Thu, 6 Jun 2024 12:06:26 -0400 Subject: [PATCH] Fix broken Clients when restricting user client access --- check_login.php | 2 +- clients.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/check_login.php b/check_login.php index 57c5bd36..7a6730a4 100644 --- a/check_login.php +++ b/check_login.php @@ -82,7 +82,7 @@ try { // Role / Client Access Permission Check if ($session_user_role < 3 && !empty($client_access_string)) { - $access_permission_query = "AND client_id IN ($client_access_string)"; + $access_permission_query = "AND clients.client_id IN ($client_access_string)"; } else { $access_permission_query = ""; } diff --git a/clients.php b/clients.php index 20d49fa2..fcd5937f 100644 --- a/clients.php +++ b/clients.php @@ -32,6 +32,8 @@ if (isset($_GET['tags']) && is_array($_GET['tags']) && !empty($_GET['tags'])) { // Convert the sanitized tags into a comma-separated string $sanitizedTagsString = implode(",", $sanitizedTags); $tag_query = "AND tags.tag_id IN ($sanitizedTagsString)"; +} else{ + $tag_query = ''; } // Industry Filter