From a4e48ccc7d921832a199b74baabe2fff23f1c6f1 Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Tue, 11 Dec 2012 15:44:32 +0100 Subject: [PATCH] [-] CORE : fixed bug #PSCFV-6098 Double @ in customer email address crashes BO --- classes/Customer.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/classes/Customer.php b/classes/Customer.php index ef5cd2ffe..e1e3051dc 100644 --- a/classes/Customer.php +++ b/classes/Customer.php @@ -372,8 +372,13 @@ class CustomerCore extends ObjectModel public static function customerExists($email, $return_id = false, $ignore_guest = true) { if (!Validate::isEmail($email)) - die (Tools::displayError()); - + { + if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_) + die (Tools::displayError('Invalid email')); + else + return false; + } + $sql = 'SELECT `id_customer` FROM `'._DB_PREFIX_.'customer` WHERE `email` = \''.pSQL($email).'\'