From 329a0966caf7bfcd706deca344f44d4a65a4bfe0 Mon Sep 17 00:00:00 2001 From: fBrignoli Date: Tue, 11 Oct 2011 12:59:30 +0000 Subject: [PATCH] [-] FO : Notice if blocknewsletter has been removed git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9229 b9a71923-0436-4b27-9f14-aed3839534dd --- controllers/front/AuthController.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php index 65483ed7d..be10d2e5a 100644 --- a/controllers/front/AuthController.php +++ b/controllers/front/AuthController.php @@ -74,7 +74,11 @@ class AuthControllerCore extends FrontController $this->assignCountries(); - $this->context->smarty->assign('newsletter', (int)Module::getInstanceByName('blocknewsletter')->active); + $active_module_newsletter = false; + if ($module_newsletter = Module::getInstanceByName('blocknewsletter')) + $active_module_newsletter = $module_newsletter->active; + + $this->context->smarty->assign('newsletter', (int)$active_module_newsletter); $back = Tools::getValue('back'); $key = Tools::safeOutput(Tools::getValue('key')); @@ -561,15 +565,15 @@ class AuthControllerCore extends FrontController protected function sendConfirmationMail(Customer $customer) { return Mail::Send( - $this->context->language->id, - 'account', + $this->context->language->id, + 'account', Mail::l('Welcome!'), array( - '{firstname}' => $customer->firstname, - '{lastname}' => $customer->lastname, - '{email}' => $customer->email, - '{passwd}' => Tools::getValue('passwd')), - $customer->email, + '{firstname}' => $customer->firstname, + '{lastname}' => $customer->lastname, + '{email}' => $customer->email, + '{passwd}' => Tools::getValue('passwd')), + $customer->email, $customer->firstname.' '.$customer->lastname ); }