• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Service/Context.php
  • Класс: Bitrix\Crm\Service\Context
  • Вызов: Context::getCurrentUserId
protected function getCurrentUserId(): int
{
	global $USER;
	if(is_object($USER) && $USER instanceof \CUser)
	{
		return (int) CurrentUser::get()->getId();
	}

	return 0;
}