diff --git a/controllers/front/PasswordController.php b/controllers/front/PasswordController.php index e36d84a9a..650b8fabf 100644 --- a/controllers/front/PasswordController.php +++ b/controllers/front/PasswordController.php @@ -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.'); } diff --git a/themes/default/password.tpl b/themes/default/password.tpl index db61001a3..c444fa001 100644 --- a/themes/default/password.tpl +++ b/themes/default/password.tpl @@ -31,9 +31,9 @@ {include file="$tpl_dir./errors.tpl"} {if isset($confirmation) && $confirmation == 1} -

{l s='Your password has been successfully reset and a confirmation has been sent to your email address:'} {if isset($email)}{$email|escape:'htmlall':'UTF-8'|stripslashes}{/if}

+

{l s='Your password has been successfully reset and a confirmation has been sent to your email address:'} {if isset($customer_email)}{$customer_email|escape:'htmlall':'UTF-8'|stripslashes}{/if}

{elseif isset($confirmation) && $confirmation == 2} -

{l s='A confirmation email has been sent to your address:'} {if isset($email)}{$email|escape:'htmlall':'UTF-8'|stripslashes}{/if}

+

{l s='A confirmation email has been sent to your address:'} {if isset($customer_email)}{$customer_email|escape:'htmlall':'UTF-8'|stripslashes}{/if}

{else}

{l s='Please enter the email address you used to register. We will then send you a new password. '}