feat: add hability to disable login (#378)

This commit is contained in:
Miguel Ribeiro
2024-06-08 00:04:50 +02:00
committed by GitHub
parent f79a3f9957
commit 092be22183
28 changed files with 205 additions and 12 deletions
+15
View File
@@ -0,0 +1,15 @@
<?php
/*
This migration adds a column to the admin table to enable the option to disable login
*/
/** @noinspection PhpUndefinedVariableInspection */
$columnQuery = $db->query("SELECT * FROM pragma_table_info('admin') where name='login_disabled'");
$columnRequired = $columnQuery->fetchArray(SQLITE3_ASSOC) === false;
if ($columnRequired) {
$db->exec('ALTER TABLE admin ADD COLUMN login_disabled BOOLEAN DEFAULT 0');
}
?>