From d751ded0d4fc504b4ccec95c2ec96d354a8e273f Mon Sep 17 00:00:00 2001 From: flashwave Date: Sun, 8 Jul 2018 21:26:57 +0200 Subject: [PATCH] Fixed e-mail changing in the settings panel. --- public/settings.php | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/public/settings.php b/public/settings.php index e5e83dd6..9766d186 100644 --- a/public/settings.php +++ b/public/settings.php @@ -168,21 +168,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { break; } - $checkIfAlreadySet = $db->prepare(' - SELECT COUNT(`user_id`) - FROM `msz_users` - WHERE LOWER(:email) = LOWER(:email) - '); - $checkIfAlreadySet->bindValue('email', $_POST['email']['new']); - $isAlreadySet = $checkIfAlreadySet->execute() - ? $checkIfAlreadySet->fetchColumn() > 0 - : false; - - if ($isAlreadySet) { - $settingsErrors[] = 'This is your e-mail address already!'; - break; - } - $email_validate = user_validate_email($_POST['email']['new'], true); if ($email_validate !== '') { @@ -196,7 +181,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { break; case 'in-use': - $settingsErrors[] = 'This e-mail address has already been used by another user.'; + $settingsErrors[] = 'This e-mail address is already in use.'; break; default: