feat: add hability to disable login (#378)
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user