decease session expiration time
All checks were successful
rvr-nextgen/pipeline/pr-master This commit looks good

This commit is contained in:
Bence Pőcze 2024-11-26 21:01:29 +01:00
parent cde14ee779
commit cac57d7f71
Signed by: bence
GPG Key ID: DC5BD6E95A333E6D
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ class MaintainDatabaseCommand extends Command
//TODO: model may be used for sessions too //TODO: model may be used for sessions too
$select = new Select(\Container::$dbConnection, 'sessions'); $select = new Select(\Container::$dbConnection, 'sessions');
$select->columns(['id']); $select->columns(['id']);
$select->where('updated', '<', (new DateTime('-7 days'))->format('Y-m-d H:i:s')); $select->where('updated', '<', (new DateTime('-1 days'))->format('Y-m-d H:i:s'));
$result = $select->execute(); $result = $select->execute();

View File

@ -118,7 +118,7 @@ Container::$routeCollection->group('communities', function (RouteCollection $rou
Container::$sessionHandler = new DatabaseSessionHandler( Container::$sessionHandler = new DatabaseSessionHandler(
Container::$dbConnection, Container::$dbConnection,
'sessions', 'sessions',
new DateTime('-7 days') new DateTime('-1 days')
); );
session_set_save_handler(Container::$sessionHandler, true); session_set_save_handler(Container::$sessionHandler, true);