Skip to content

Commit

Permalink
techjoomla#12 chore: Update query, added joins based on filters & int…
Browse files Browse the repository at this point in the history
…roduce new ACL
  • Loading branch information
pravinTek committed Aug 20, 2019
1 parent d4eff8b commit 248822f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/components/com_cluster/administrator/models/clusterusers.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ protected function getListQuery()
// Filter by search in title.
$search = $this->getState('filter.search');

if (!empty($search))
{
if (stripos($search, 'id:') === 0)
{
$query->where('cu.id = ' . (int) substr($search, 3));
}
else
{
$search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%'));
$query->where('(users.name LIKE' . $search . ' OR cl.name LIKE ' . $search . ')');
}
}

$created_by = $this->getState('filter.created_by');

if (!empty($created_by))
Expand Down

0 comments on commit 248822f

Please sign in to comment.