Possibility to reward users with shop points if they verify their email

Also generates a new activation key after they have verified their email in-case they change their email and guess the activation link for their fake email.
Also removes the given points until they verify their email again if they change their email.
This commit is contained in:
Znote
2019-10-23 21:06:24 +02:00
parent d8f22f9c33
commit be8b882166
3 changed files with 12 additions and 1 deletions

View File

@@ -43,6 +43,11 @@ if (isset($_GET['success']) === true && empty($_GET['success']) === true) {
'active_email' => '0'
);
// If he had previously verified his email address, remove the previously aquired bonus points
if ($user_znote_data['active_email'] > 0) {
$update_znote_data['points'] = $user_znote_data['points'] - $config['mailserver']['verify_email_points'];
}
user_update_account($update_data);
user_update_znote_account($update_znote_data);
header('Location: settings.php?success');