• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/Workflow/EntityStageTable.php
  • Класс: Bitrix\Crm\Workflow\represents
  • Вызов: represents::getCurrentUserId
static function getCurrentUserId(): ?int
{
	/** @var \CUser */
	global $USER;

	$userId = 0;

	if (is_object($USER) && $USER instanceof \CUser)
	{
		if ($USER->IsAuthorized())
		{
			$userId = (int)$USER->GetID();
		}
	}

	return $userId > 0 ? $userId : null;
}