20 $currentModeratorsIds = $this->getCurrentModerators($groupId);
22 $addIds = array_diff($this->moderatorsIds, $currentModeratorsIds);
23 $deleteIds = array_diff($currentModeratorsIds, $this->moderatorsIds);
27 UserToGroup::addModerators([
28 "group_id" => $groupId,
30 "current_user_id" => $this->executiveUserId
36 $resRelation = UserToGroupTable::getList([
38 "GROUP_ID" => $groupId,
39 "@USER_ID" => $deleteIds
43 while ($relation = $resRelation->fetch())
45 \CSocNetUserToGroup::delete($relation[
"ID"]);