From 534bbd4d9935660ef09a3c6c3177fb17675fd9cd Mon Sep 17 00:00:00 2001 From: vChabot Date: Wed, 9 May 2012 09:21:19 +0000 Subject: [PATCH] [-] FO : BugFix : #PSCFV-2198 : Unable to edit customer account in front git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15090 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/front/IdentityController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/front/IdentityController.php b/controllers/front/IdentityController.php index 563086e86..1a5d9b464 100644 --- a/controllers/front/IdentityController.php +++ b/controllers/front/IdentityController.php @@ -54,9 +54,9 @@ class IdentityControllerCore extends FrontController $this->errors[] = Tools::displayError('Invalid date of birth'); else { - $this->customer->birthday = (empty($_POST['years']) ? '' : (int)($_POST['years']).'-'.(int)($_POST['months']).'-'.(int)($_POST['days'])); + $this->customer->birthday = (empty($_POST['years']) ? '' : (int)$_POST['years'].'-'.(int)$_POST['months'].'-'.(int)$_POST['days']); - if (Customer::customerExists(Tools::getValue('email'), true)) + if (Customer::customerExists(Tools::getValue('email'), true) && $this->customer->email != Tools::getValue('email')) $this->errors[] = Tools::displayError('An account is already registered with this e-mail.'); $_POST['old_passwd'] = trim($_POST['old_passwd']); @@ -74,7 +74,7 @@ class IdentityControllerCore extends FrontController if (!count($this->errors)) { - $this->customer->id_default_group = (int)($prev_id_default_group); + $this->customer->id_default_group = (int)$prev_id_default_group; $this->customer->firstname = Tools::ucfirst(Tools::strtolower($this->customer->firstname)); if (!isset($_POST['newsletter'])) $this->customer->newsletter = 0;