[-] 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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user