• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/fuser.php
  • Класс: BitrixSaleFuser
  • Вызов: Fuser::getCurrentUserId
static function getCurrentUserId(): ?int
{
	global $USER;

	if (!(
		isset($USER)
		&& $USER instanceof CUser
	))
	{
		return null;
	}

	$userId = (int)$USER->GetID();

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