RVRNEXT-5 fix audit logger for non-web access
This commit is contained in:
parent
882b326aca
commit
0b261b6272
6
app.php
6
app.php
@ -17,9 +17,9 @@ class Container
|
||||
static SokoWeb\Interfaces\Database\IConnection $dbConnection;
|
||||
static SokoWeb\Interfaces\Database\IAuditLogger $auditLogger;
|
||||
static SokoWeb\Interfaces\PersistentData\IPersistentDataManager $persistentDataManager;
|
||||
static SokoWeb\Interfaces\Routing\IRouteCollection $routeCollection;
|
||||
static SokoWeb\Interfaces\Session\ISessionHandler $sessionHandler;
|
||||
static SokoWeb\Interfaces\Request\IRequest $request;
|
||||
static ?SokoWeb\Interfaces\Routing\IRouteCollection $routeCollection = null;
|
||||
static ?SokoWeb\Interfaces\Session\ISessionHandler $sessionHandler = null;
|
||||
static ?SokoWeb\Interfaces\Request\IRequest $request = null;
|
||||
}
|
||||
|
||||
Container::$dbConnection = new SokoWeb\Database\Mysql\Connection($_ENV['DB_HOST'], $_ENV['DB_USER'], $_ENV['DB_PASSWORD'], $_ENV['DB_NAME']);
|
||||
|
@ -6,6 +6,9 @@ class AuditLogger extends AuditLoggerBase
|
||||
{
|
||||
protected function getModifierId()
|
||||
{
|
||||
if (\Container::$request === null) {
|
||||
return null;
|
||||
}
|
||||
$user = \Container::$request->user();
|
||||
if ($user === null) {
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user