From add1298b1f016aee969b6c19d78680f1970493f7 Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Tue, 24 Sep 2024 17:07:48 +0530 Subject: [PATCH] Fixed: Hotel wise restriction not working properly for the employees having access to no hotel --- controllers/admin/AdminCustomerThreadsController.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controllers/admin/AdminCustomerThreadsController.php b/controllers/admin/AdminCustomerThreadsController.php index 26bb3eebe..2d7b52891 100644 --- a/controllers/admin/AdminCustomerThreadsController.php +++ b/controllers/admin/AdminCustomerThreadsController.php @@ -66,9 +66,8 @@ class AdminCustomerThreadsControllerCore extends AdminController $this->access_select = ' SELECT a.`id_customer_thread` FROM '._DB_PREFIX_.'customer_thread a'; $this->access_join = ' LEFT JOIN '._DB_PREFIX_.'orders ord ON (a.id_order = ord.id_order)'; $this->access_join .= ' LEFT JOIN '._DB_PREFIX_.'htl_booking_detail hbd ON (hbd.id_order = ord.id_order)'; - $this->access_where = ' WHERE 1 '; if ($acsHtls = HotelBranchInformation::getProfileAccessedHotels($this->context->employee->id_profile, 1, 1)) { - $this->access_where .= ' AND IF(a.`id_order`, hbd.`id_hotel` IN ('.implode(',', $acsHtls).'), 1)'; + $this->access_where = ' AND IF(a.`id_order`, hbd.`id_hotel` IN ('.implode(',', $acsHtls).'), 1)'; } $this->fields_list = array(