• Модуль: socialnetwork
  • Путь к файлу: ~/bitrix/modules/socialnetwork/lib/copy/implement/usertogroup.php
  • Класс: BitrixSocialnetworkCopyImplementUserToGroup
  • Вызов: UserToGroup::getFields
public function getFields(Container $container, $entityId)
{
	$fields = [];

	$filter = [
		"GROUP_ID" => $entityId,
		"!=ROLE" => UserToGroupTable::ROLE_OWNER
	];
	if (in_array("UF_SG_DEPT", $this->ufIgnoreList))
	{
		$filter["AUTO_MEMBER"] = "N";
	}

	$dictionary = $container->getDictionary();

	$queryObject = CSocNetUserToGroup::getList(["ID" => "DESC"], $filter);
	while ($userToGroup = $queryObject->fetch())
	{
		if (
			isset($dictionary["NEW_OWNER_ID"])
			&& $dictionary["NEW_OWNER_ID"] == $userToGroup["USER_ID"]
		)
		{
			continue;
		}

		$fields[] = $userToGroup;
	}

	return $fields;
}