[-] BO : FixBug smarty email variable override by blockcontact

This commit is contained in:
Jerome Nadaud
2013-08-07 15:09:14 +02:00
parent 942a946147
commit 239c5adb5a
2 changed files with 5 additions and 4 deletions
+3 -2
View File
@@ -40,6 +40,7 @@ class PasswordControllerCore extends FrontController
$this->errors[] = Tools::displayError('Invalid email address.');
else
{
$customer = new Customer();
$customer->getByemail($email);
if (!Validate::isLoadedObject($customer))
@@ -57,7 +58,7 @@ class PasswordControllerCore extends FrontController
'{url}' => $this->context->link->getPageLink('password', true, null, 'token='.$customer->secure_key.'&id_customer='.(int)$customer->id)
);
if (Mail::Send($this->context->language->id, 'password_query', Mail::l('Password query confirmation'), $mail_params, $customer->email, $customer->firstname.' '.$customer->lastname))
$this->context->smarty->assign(array('confirmation' => 2, 'email' => $customer->email));
$this->context->smarty->assign(array('confirmation' => 2, 'customer_email' => $customer->email));
else
$this->errors[] = Tools::displayError('An error occurred while sending the email.');
}
@@ -90,7 +91,7 @@ class PasswordControllerCore extends FrontController
'{passwd}' => $password
);
if (Mail::Send($this->context->language->id, 'password', Mail::l('Your new password'), $mail_params, $customer->email, $customer->firstname.' '.$customer->lastname))
$this->context->smarty->assign(array('confirmation' => 1, 'email' => $customer->email));
$this->context->smarty->assign(array('confirmation' => 1, 'customer_email' => $customer->email));
else
$this->errors[] = Tools::displayError('An error occurred while sending the email.');
}