Skip to content

Commit

Permalink
User search API, return all current and future us
Browse files Browse the repository at this point in the history
ers, when search status = all
  • Loading branch information
withanage authored and ewhanson committed Oct 31, 2024
1 parent 17d1297 commit 730cc7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion classes/user/Collector.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Collector implements CollectorInterface

public const STATUS_ACTIVE = 'active';
public const STATUS_DISABLED = 'disabled';
public const STATUS_ALL = null;
public const STATUS_ALL = 'all';

public DAO $dao;

Expand Down Expand Up @@ -488,6 +488,10 @@ protected function buildUserGroupFilter(Builder $query): self
}

$currentDateTime = Core::getCurrentDate();
if ($this->status === self::STATUS_ALL) {
$this->userUserGroupStatus = UserUserGroupStatus::STATUS_ALL;
}

$subQuery = DB::table('user_user_groups as uug')
->join('user_groups AS ug', 'uug.user_group_id', '=', 'ug.user_group_id')
->whereColumn('uug.user_id', '=', 'u.user_id')
Expand Down

0 comments on commit 730cc7f

Please sign in to comment.