Skip to content

Commit 4874a19

Browse files
committed
refactor: annulla token di sessione in fase di restore
1 parent bc60a60 commit 4874a19

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/Backup.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,10 @@ public static function restore($path, $cleanup = true, $password = null)
387387
$extraction_dir = is_dir($path) ? $path : Zip::extract($path);
388388
}
389389

390-
// TODO: Forzo il log out di tutti gli utenti e ne impedisco il login
391-
// fino a ripristino ultimato
390+
// Annulla i token di sessione per forzare il logout di tutti gli utenti
391+
if ($database->columnExists('zz_users', 'session_token')) {
392+
$database->query('UPDATE `zz_users` SET `session_token` = NULL');
393+
}
392394

393395
// Rimozione del database
394396
$tables = include base_dir().'/update/tables.php';

0 commit comments

Comments
 (0)