From: Alan Knowles Date: Thu, 15 Apr 2021 02:20:51 +0000 (+0800) Subject: Fix #6680 - filter list on booking by group QC X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=commitdiff_plain;h=1738c1ddcd74af8403f55f429cfab68166a8b0d6 Fix #6680 - filter list on booking by group QC --- diff --git a/DataObjects/Core_person.php b/DataObjects/Core_person.php index c7f3c5c4..f473b5c0 100644 --- a/DataObjects/Core_person.php +++ b/DataObjects/Core_person.php @@ -1007,6 +1007,25 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject )" ); } + if(!empty($q['in_group_starts'])){ + + $v = $this->escape($q['in_group_starts']); + + $this->whereAdd(" + $tn_p.id IN ( + SELECT + DISTINCT(user_id) FROM $tn_gm + LEFT JOIN + $tn_g + ON + $tn_g.id = $tn_gm.group_id + WHERE + $tn_g.name LIKE '{$v}%' + )" + ); + } + + // #2307 Search Country!! if (!empty($q['query']['in_country'])) {