From 2c4a4c0475be4c9a69352ce313cf7805041bf279 Mon Sep 17 00:00:00 2001 From: ravitshalem Date: Sat, 6 Apr 2019 16:23:43 +0300 Subject: [PATCH] KMS-19428:removing default criteria when retrieving groups of user --- alpha/lib/model/KuserKgroupPeer.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/alpha/lib/model/KuserKgroupPeer.php b/alpha/lib/model/KuserKgroupPeer.php index 0711298fb05..a874524d6f9 100644 --- a/alpha/lib/model/KuserKgroupPeer.php +++ b/alpha/lib/model/KuserKgroupPeer.php @@ -109,10 +109,15 @@ public static function retrieveKgroupIdsByKuserId($kuserId){ */ public static function retrieveKgroupIdsByKuserIdAndPartnerId($kuserId, $partnerId) { + //remove default criteria + self::setUseCriteriaFilter(false); $c = new Criteria(); $c->add(KuserKgroupPeer::KUSER_ID, array($kuserId), Criteria::IN); $c->addAnd ( KuserKgroupPeer::PARTNER_ID, $partnerId, Criteria::EQUAL ); + $c->addAnd ( KuserKgroupPeer::STATUS, array(KuserKgroupStatus::DELETED), Criteria::NOT_IN); + $kuserKgroups = KuserKgroupPeer::doSelect($c); + self::setUseCriteriaFilter(true); $kgroupIds = array(); foreach ($kuserKgroups as $kuserKgroup){