From b37bd5f0aeeb2e3a7649a3a2e73542e5a66908f5 Mon Sep 17 00:00:00 2001 From: slawkens1 Date: Sun, 12 Nov 2017 21:56:47 +0100 Subject: [PATCH] * github is weird --- system/pages/account/confirm_email.php | 2 ++ system/pages/createaccount.php | 1 + 2 files changed, 3 insertions(+) diff --git a/system/pages/account/confirm_email.php b/system/pages/account/confirm_email.php index 679b4448..a3816854 100644 --- a/system/pages/account/confirm_email.php +++ b/system/pages/account/confirm_email.php @@ -17,11 +17,13 @@ if(empty($hash)) { return; } +$res = $db->query('SELECT `email_hash` FROM `accounts` WHERE `email_hash` = ' . $db->quote($hash)); if(!$res->rowCount()) { note("Your email couldn't be verified. Please contact staff to do it manually."); } else { + $db->update('accounts', array('email_verified' => '1'), array('email_hash' => $hash)); success('You have now verified your e-mail, this will increase the security of your account. Thank you for doing this.'); } ?> diff --git a/system/pages/createaccount.php b/system/pages/createaccount.php index 6796b924..845f4892 100644 --- a/system/pages/createaccount.php +++ b/system/pages/createaccount.php @@ -160,6 +160,7 @@ if($save) $hash = md5(generateRandomString(16, true, true) . $email); $new_account->setCustomField('email_hash', $hash); + $verify_url = getLink('account/confirm_email/' . $hash); $server_name = $config['lua']['serverName']; $body_plain = $twig->render('mail.account.verify.plain.html.twig', array(