mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2025-10-13 18:04:54 +02:00
Allow users to verify their email in myaccount.php
Even if they arent forced to verify email during registration. If they change their email in the settings later, the verification is lost. Todo: Add a reward for first-time verification.
This commit is contained in:
@@ -13,6 +13,8 @@ if (!function_exists("elapsedTime")) {
|
||||
}
|
||||
}
|
||||
|
||||
// ALTER TABLE `znote_accounts` ADD `active_email` TINYINT(4) NOT NULL DEFAULT '0' AFTER `active`;
|
||||
|
||||
$install = "
|
||||
<h2>Install:</h2>
|
||||
<ol>
|
||||
@@ -40,6 +42,7 @@ CREATE TABLE IF NOT EXISTS `znote_accounts` (
|
||||
`points` int(10) DEFAULT 0,
|
||||
`cooldown` int(10) DEFAULT 0,
|
||||
`active` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`active_email` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`activekey` int(11) NOT NULL DEFAULT '0',
|
||||
`flag` varchar(20) NOT NULL,
|
||||
`secret` char(16) DEFAULT NULL,
|
||||
|
@@ -1246,7 +1246,7 @@ function user_create_account($register_data, $maildata) {
|
||||
$account_id = (isset($register_data['name'])) ? user_id($register_data['name']) : user_id($register_data['id']);
|
||||
$activeKey = rand(100000000,999999999);
|
||||
$active = ($maildata['register']) ? 0 : 1;
|
||||
mysql_insert("INSERT INTO `znote_accounts` (`account_id`, `ip`, `created`, `active`, `activekey`, `flag`) VALUES ('$account_id', '$ip', '$created', '$active', '$activeKey', '$flag')");
|
||||
mysql_insert("INSERT INTO `znote_accounts` (`account_id`, `ip`, `created`, `active`, `active_email`, `activekey`, `flag`) VALUES ('$account_id', '$ip', '$created', '$active', '0', '$activeKey', '$flag')");
|
||||
|
||||
if ($maildata['register']) {
|
||||
|
||||
|
Reference in New Issue
Block a user