Skip to content

Commit

Permalink
User ID might not be derivable.
Browse files Browse the repository at this point in the history
  • Loading branch information
prwater committed Jul 7, 2022
1 parent ffb4e44 commit 9d28c94
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/RequestLoggerLight.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class RequestLoggerLight extends PlaisioObject implements RequestLogger
public ?int $rqlId = null;

//--------------------------------------------------------------------------------------------------------------------

/**
* Logs the HTTP page request.
*
Expand All @@ -65,17 +66,26 @@ public function logRequest(?int $status): void

try
{
$cmp = $this->nub->company->cmpId;
$cmpId = $this->nub->company->cmpId;
}
catch (\Throwable $e)
{
$cmpId = null;
}

try
{
$usrId = $this->nub->session->usrId;
}
catch (\Throwable $e)
{
$cmp = null;
$usrId = null;
}

$this->rqlId = $this->nub->DL->abcRequestLoggerLightInsertRequest(
$this->nub->session->sesId,
$cmp,
$this->nub->session->usrId,
$cmpId,
$usrId,
$this->nub->requestHandler->getPagId(),
mb_substr($this->nub->request->getRequestUri() ?? '', 0, C::LEN_RQL_REQUEST),
mb_substr($this->nub->request->getMethod() ?? '', 0, C::LEN_RQL_METHOD),
Expand Down

0 comments on commit 9d28c94

Please sign in to comment.