• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/controller/debugger.php
  • Класс: BitrixBizprocControllerDebugger
  • Вызов: Debugger::getSession
private function getSession(string $id = null): ?Session
{
	$userId = $this->getCurrentUser()->getId();

	$session = $id ? Manager::getSessionById($id) : Manager::getActiveSession();
	if (!$session)
	{
		$this->addError(new Error(Loc::getMessage('BIZPROC_CONTROLLER_DEBUGGER_NO_SESSION')));

		return null;
	}

	if (!$session->canUserDebug($userId))
	{
		$this->addError(new Error(Loc::getMessage('BIZPROC_CONTROLLER_DEBUGGER_CAN_DEBUG_ERROR')));

		return null;
	}

	return $session;
}