• Модуль: mobile
  • Путь к файлу: ~/bitrix/modules/mobile/lib/auth.php
  • Класс: BitrixMobileAuth
  • Вызов: Auth::getOneTimeAuthHash
static function getOneTimeAuthHash(int $userId = null)
{
	$path = '/mobile/';

	if (!$userId)
	{
		global $USER;
		$userId = $USER->getId();
	}

	$siteId = CSite::GetDefSite();
	$hash = CUser::GetHitAuthHash($path, $userId, $siteId);
	if ($hash)
	{
		return $hash;
	}
	else
	{
		return CUser::AddHitAuthHash($path, $userId, $siteId);
	}
}