47 $workgroupIdList = [];
49 foreach ($pushList as $push)
51 if (!in_array($push[
'EVENT'], [
53 Counter\
Event\EventDictionary::EVENT_WORKGROUP_USER_UPDATE,
54 Counter\
Event\EventDictionary::EVENT_WORKGROUP_USER_DELETE,
61 $workgroupIdList[] = $push[
'GROUP_ID'];
64 $workgroupIdList = array_unique($workgroupIdList);
65 if (empty($workgroupIdList))
72 foreach ($workgroupIdList as $workgroupId)
74 if (empty($userIdList[$workgroupId]))
79 (
new PushSender())->sendUserCounters($userIdList[$workgroupId], [
80 'workgroupId' => $workgroupId,
99 if (empty($groupIdList))
106 $res = WorkgroupTable::query()
112 '@ID' => $groupIdList,
116 while ($workgroupFields = $res->fetch())
120 $resRelation = UserToGroupTable::query()
126 '@ROLE' => $roleFilterValue,
127 'GROUP_ID' => (
int)$workgroupFields[
'ID'],
128 'USER.ACTIVE' =>
true,
132 $userIdList[(int)$workgroupFields[
'ID']] = [];
133 while ($relationFields = $resRelation->fetch())
135 $userIdList[(int)$workgroupFields[
'ID']][] = (
int)$relationFields[
'USER_ID'];