34 if (!$this->isCommandCorrect($handlerResult, $command))
36 return $handlerResult;
39 $currentMembers = $this->getMemberIds(
$entity->getId());
45 foreach ($membersByCommand as $memberId)
47 if (in_array($memberId, $currentMembers,
true))
52 $requestResult = CSocNetUserToGroup::SendRequestToJoinGroup(
53 $command->getInitiatorId(),
56 Loc::getMessage(
'SOCIALNETWORK_JOIN_PROJECT')
61 $handlerResult->addApplicationError();
65 if (!empty($membersByCommand))
67 $handlerResult->setGroupChanged();
70 return $handlerResult;