• Модуль: calendar
  • Путь к файлу: ~/bitrix/modules/calendar/lib/sharing/sharinguser.php
  • Класс: BitrixCalendarSharingSharingUser
  • Вызов: SharingUser::getAnonymousUserForOwner
public function getAnonymousUserForOwner(array $userParams): ?int
{
	$user = $this->getByHash();

	if (!$user)
	{
		$user = $this->createUser($userParams);
	}

	if ($user)
	{
		$this->saveAuthHashToCookie($user->getXmlId());

		$this->updateUserPersonalInfo($user->getId(), $userParams);

		return $user->getId();
	}

	return null;
}