• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Service/Context.php
  • Класс: BitrixImV2ServiceContext
  • Вызов: Context::getUserId
public function getUserId(): int
{
	global $USER;
	if (
		$this->actionContextUserId === null
		&& ($USER instanceof CUser)
	)
	{
		return (int)$USER->getId();
	}

	return (int)$this->actionContextUserId;
}