40 foreach ($fields as $field)
42 if (!\CSocNetUserToGroup::add($field))
45 if ($exception = $APPLICATION->getException())
47 $errorMessage = $exception->getString();
48 $this->result->addError(
new Error($errorMessage, self::GROUP_USER_COPY_ERROR));
50 if ($errorMessage ==
'')
52 $this->result->addError(
new Error(
"Error adding a user to the group", self::GROUP_USER_COPY_ERROR));
57 if ($this->userGroupHelper)