[-] CORE : fixed bug #PSCFV-6098 Double @ in customer email address crashes BO

This commit is contained in:
vAugagneur
2012-12-11 15:44:32 +01:00
parent 2c06839185
commit a4e48ccc7d
+7 -2
View File
@@ -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).'\'