From ecd1da9cb96d838b3da70fb1051ce9bf51ca524d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Tue, 26 Nov 2024 21:01:29 +0100 Subject: [PATCH] decease session expiration time --- src/Cli/MaintainDatabaseCommand.php | 2 +- web.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cli/MaintainDatabaseCommand.php b/src/Cli/MaintainDatabaseCommand.php index 124f57c..3760d46 100644 --- a/src/Cli/MaintainDatabaseCommand.php +++ b/src/Cli/MaintainDatabaseCommand.php @@ -67,7 +67,7 @@ class MaintainDatabaseCommand extends Command //TODO: model may be used for sessions too $select = new Select(\Container::$dbConnection, 'sessions'); $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(); diff --git a/web.php b/web.php index df0f0b3..587ff34 100644 --- a/web.php +++ b/web.php @@ -118,7 +118,7 @@ Container::$routeCollection->group('communities', function (RouteCollection $rou Container::$sessionHandler = new DatabaseSessionHandler( Container::$dbConnection, 'sessions', - new DateTime('-7 days') + new DateTime('-1 days') ); session_set_save_handler(Container::$sessionHandler, true);