decease session expiration time
Some checks failed
rvr-nextgen/pipeline/pr-master There was a failure building this commit
Some checks failed
rvr-nextgen/pipeline/pr-master There was a failure building this commit
This commit is contained in:
parent
61fd393da1
commit
ecd1da9cb9
@ -67,7 +67,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();
|
||||||
|
|
||||||
|
2
web.php
2
web.php
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user