web-base/Core/Configuration/Patch/2024-12-27_Session-last-online.php
2024-12-27 13:32:12 +01:00

15 lines
500 B
PHP

<?php
use Core\Configuration\CreateDatabase;
use Core\Driver\SQL\Column\DateTimeColumn;
use Core\Driver\SQL\Expression\CurrentTimeStamp;
use Core\Objects\DatabaseEntity\Session;
$handler = Session::getHandler($sql);
$queries[] = $sql->alterTable($handler->getTableName())
->add(new DateTimeColumn($handler->getColumnName("lastOnline"), false, new CurrentTimeStamp()));
CreateDatabase::loadDefaultACL($sql, $queries, [
\Core\API\User\GetSessions::class,
\Core\API\User\DestroySession::class
]);