[-] BO : FixBug smarty email variable override by blockcontact
This commit is contained in:
@@ -40,6 +40,7 @@ class PasswordControllerCore extends FrontController
|
|||||||
$this->errors[] = Tools::displayError('Invalid email address.');
|
$this->errors[] = Tools::displayError('Invalid email address.');
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
$customer = new Customer();
|
$customer = new Customer();
|
||||||
$customer->getByemail($email);
|
$customer->getByemail($email);
|
||||||
if (!Validate::isLoadedObject($customer))
|
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)
|
'{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))
|
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
|
else
|
||||||
$this->errors[] = Tools::displayError('An error occurred while sending the email.');
|
$this->errors[] = Tools::displayError('An error occurred while sending the email.');
|
||||||
}
|
}
|
||||||
@@ -90,7 +91,7 @@ class PasswordControllerCore extends FrontController
|
|||||||
'{passwd}' => $password
|
'{passwd}' => $password
|
||||||
);
|
);
|
||||||
if (Mail::Send($this->context->language->id, 'password', Mail::l('Your new password'), $mail_params, $customer->email, $customer->firstname.' '.$customer->lastname))
|
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
|
else
|
||||||
$this->errors[] = Tools::displayError('An error occurred while sending the email.');
|
$this->errors[] = Tools::displayError('An error occurred while sending the email.');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,9 +31,9 @@
|
|||||||
{include file="$tpl_dir./errors.tpl"}
|
{include file="$tpl_dir./errors.tpl"}
|
||||||
|
|
||||||
{if isset($confirmation) && $confirmation == 1}
|
{if isset($confirmation) && $confirmation == 1}
|
||||||
<p class="success">{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}</p>
|
<p class="success">{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}</p>
|
||||||
{elseif isset($confirmation) && $confirmation == 2}
|
{elseif isset($confirmation) && $confirmation == 2}
|
||||||
<p class="success">{l s='A confirmation email has been sent to your address:'} {if isset($email)}{$email|escape:'htmlall':'UTF-8'|stripslashes}{/if}</p>
|
<p class="success">{l s='A confirmation email has been sent to your address:'} {if isset($customer_email)}{$customer_email|escape:'htmlall':'UTF-8'|stripslashes}{/if}</p>
|
||||||
{else}
|
{else}
|
||||||
<p>{l s='Please enter the email address you used to register. We will then send you a new password. '}</p>
|
<p>{l s='Please enter the email address you used to register. We will then send you a new password. '}</p>
|
||||||
<form action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std" id="form_forgotpassword">
|
<form action="{$request_uri|escape:'htmlall':'UTF-8'}" method="post" class="std" id="form_forgotpassword">
|
||||||
|
|||||||
Reference in New Issue
Block a user