mirror of
https://github.com/slawkens/myaac.git
synced 2026-01-20 13:16:23 +01:00
[WIP] Working app auth (Still not ready)
Missing rec key validation Doesn't work with google recaptcha plugin
This commit is contained in:
@@ -11,6 +11,10 @@ $up = function () use ($db) {
|
||||
$db->addColumn('accounts', '2fa_type', "tinyint NOT NULL DEFAULT 0 AFTER `web_flags`");
|
||||
}
|
||||
|
||||
if (!$db->hasColumn('accounts', '2fa_secret')) {
|
||||
$db->addColumn('accounts', '2fa_secret', "varchar(16) NOT NULL DEFAULT '' AFTER `2fa_type`");
|
||||
}
|
||||
|
||||
// add myaac_account_email_codes table
|
||||
if (!$db->hasTable(TABLE_PREFIX . 'account_email_codes')) {
|
||||
$db->exec(file_get_contents(__DIR__ . '/46-account_email_codes.sql'));
|
||||
@@ -22,6 +26,10 @@ $down = function () use ($db) {
|
||||
$db->dropColumn('accounts', '2fa_type');
|
||||
}
|
||||
|
||||
if ($db->hasColumn('accounts', '2fa_secret')) {
|
||||
$db->dropColumn('accounts', '2fa_secret');
|
||||
}
|
||||
|
||||
if ($db->hasTable(TABLE_PREFIX . 'account_email_codes')) {
|
||||
$db->dropTable(TABLE_PREFIX . 'account_email_codes');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user