From 02b6dcaab313d0960442adb526e6642b659ac45c Mon Sep 17 00:00:00 2001 From: Sanjivani Patil Date: Mon, 2 Jul 2018 13:52:47 +0530 Subject: [PATCH] Bug #130036 Fix: User load issue see on hierarchy user list --- administrator/models/hierarchys.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/administrator/models/hierarchys.php b/administrator/models/hierarchys.php index 6fb2604..5228a28 100644 --- a/administrator/models/hierarchys.php +++ b/administrator/models/hierarchys.php @@ -125,13 +125,14 @@ protected function getListQuery() $query->from($db->quoteName('#__users', 'a')); // Join over the user field 'user_id' -$query->select( + $query->select( $db->quoteName( array('hu.id', 'hu.user_id', 'hu.subuser_id', 'hu.client', 'hu.client_id', 'hu.state', 'hu.note'), array(null, 'bossId', 'empId', null, null, null, null) ) ); - $query->join('LEFT', $db->quoteName('#__hierarchy_users', 'hu') . ' ON (' . $db->quoteName('hu.subuser_id') . ' = ' . $db->quoteName('a.id') . ')'); + $query->join('LEFT', $db->quoteName('#__hierarchy_users', 'hu') . ' ON (' . $db->quoteName('hu.subuser_id') . ' = ' . $db->quoteName('a.id') . + ') AND (' . $this->db->quoteName('hu.reports_to') . ' = ' . $this->db->quoteName('a.id') . ')'); // Filter by search in title $search = $this->getState('filter.search');