From 65e6264a0abb8897b077ad9bbcdc58e03e3a391e Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Thu, 29 Nov 2012 18:06:34 +0100 Subject: [PATCH] [-] FO : fixed bug #PSCFV-5776 - Converting a guest account via GuestTrackingController allows empty passwords, warns of an invalid password but DOES convert the account --- controllers/front/GuestTrackingController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/controllers/front/GuestTrackingController.php b/controllers/front/GuestTrackingController.php index 58cf4257c..525eed9f8 100644 --- a/controllers/front/GuestTrackingController.php +++ b/controllers/front/GuestTrackingController.php @@ -98,11 +98,11 @@ class GuestTrackingControllerCore extends FrontController $customer = new Customer((int)$order->id_customer); if (!Validate::isLoadedObject($customer)) $this->errors[] = Tools::displayError('Invalid customer'); + else if (!Tools::getValue('password')) + $this->errors[] = Tools::displayError('Invalid password'); else if (!$customer->transformToCustomer($this->context->language->id, Tools::getValue('password'))) // @todo clarify error message $this->errors[] = Tools::displayError('An error occurred while transforming guest to customer.'); - else if (!Tools::getValue('password')) - $this->errors[] = Tools::displayError('Invalid password'); else $this->context->smarty->assign('transformSuccess', true); }