From d27f0321297b7e1d89f11a6b30fa7842140beeec Mon Sep 17 00:00:00 2001 From: mBertholino Date: Wed, 28 Dec 2011 13:52:30 +0000 Subject: [PATCH] [-] BO : #PSTEST-225 : bug fixed --- controllers/admin/AdminCustomersController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/admin/AdminCustomersController.php b/controllers/admin/AdminCustomersController.php index 366e17c7e..b59dad460 100644 --- a/controllers/admin/AdminCustomersController.php +++ b/controllers/admin/AdminCustomersController.php @@ -264,6 +264,7 @@ class AdminCustomersControllerCore extends AdminController 'label' => $this->l('Password:'), 'name' => 'passwd', 'size' => 33, + 'required' => ($obj->id ? false : true), 'desc' => ($obj->id ? $this->l('Leave blank if no change') : $this->l('5 characters min., only letters, numbers, or').' -_') ), array( @@ -720,7 +721,8 @@ class AdminCustomersControllerCore extends AdminController { $customer_email = strval(Tools::getValue('email')); $customer = new Customer(); - $customer->getByEmail($customer_email); + if (Validate::isEmail($customer_email)) + $customer->getByEmail($customer_email); if ($customer->id) $this->_errors[] = Tools::displayError('An account already exists for this e-mail address:').' '.$customer_email; }