Skip to content

Commit

Permalink
Merge pull request #8347 from kaltura/Naos-14.19.0-KMS-19428
Browse files Browse the repository at this point in the history
KMS-19428:removing default criteria when retrieving groups of user
  • Loading branch information
ravitshalem authored Apr 18, 2019
2 parents 4a9904d + 2c4a4c0 commit 5e06b69
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions alpha/lib/model/KuserKgroupPeer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down

0 comments on commit 5e06b69

Please sign in to comment.