mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-13 17:24:54 +02:00

* feat: Resend Email Verify + rework the whole concept, based on new table for email hashes This make it possible that every email will work, not matter if first or last * Nothing important: change variable name * Change message
25 lines
605 B
PHP
25 lines
605 B
PHP
<?php
|
|
/**
|
|
* @var OTS_DB_MySQL $db
|
|
*/
|
|
|
|
$up = function () use ($db) {
|
|
if ($db->hasColumn('accounts', 'email_hash')) {
|
|
$db->dropColumn('accounts', 'email_hash');
|
|
}
|
|
|
|
if (!$db->hasTable(TABLE_PREFIX . 'account_emails_verify')) {
|
|
$db->query(file_get_contents(__DIR__ . '/46-account_emails_verify.sql'));
|
|
}
|
|
};
|
|
|
|
$down = function () use ($db) {
|
|
if (!$db->hasColumn('accounts', 'email_hash')) {
|
|
$db->addColumn('accounts', 'email_hash', "varchar(32) NOT NULL DEFAULT ''");
|
|
}
|
|
|
|
if ($db->hasTable(TABLE_PREFIX . 'account_emails_verify')) {
|
|
$db->dropTable(TABLE_PREFIX . 'account_emails_verify');
|
|
}
|
|
};
|