19 foreach ($groupInviteCollection as $member)
21 if ($member->isInvited())
23 $invitedUsers[] = $member->getUserId();
27 $inviteUsers = array_diff($usersIds, $invitedUsers);
28 $rejectInviteUsers = array_diff($invitedUsers, $usersIds);
30 $userId = Helper\User::getCurrentUserId();
31 $isAdmin = Helper\Workgroup::isCurrentUserModuleAdmin();
33 foreach ($inviteUsers as $inviteUserId)
35 $canInviteUser = \CSocNetUserPerms::CanPerformOperation($userId, $inviteUserId,
'invitegroup', $isAdmin);
39 \CSocNetUserToGroup::SendRequestToJoinGroup(
48 foreach ($rejectInviteUsers as $rejectInviteUserId)
51 'userId' => $rejectInviteUserId,
52 'groupId' => $spaceId,
57 Helper\Workgroup::deleteOutgoingRequest($userToGroup);