From f3e5d8a39f425d74e7f7a68427319a681137c964 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 28 Dec 2016 14:54:11 +0200 Subject: [PATCH] customer update --- src/app/backend/controllers/CustomersController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/backend/controllers/CustomersController.php b/src/app/backend/controllers/CustomersController.php index 71df105..3ffdbfd 100644 --- a/src/app/backend/controllers/CustomersController.php +++ b/src/app/backend/controllers/CustomersController.php @@ -80,8 +80,9 @@ class CustomersController extends \Phalcon\Mvc\Controller $data['password'] = $this->common->hashPasswd($data['password']); } + $current_email = $this->models->getCustomers()->getCustomerByEmail($data['email']); - if( !isset($this->models->getCustomers()->getCustomerByEmail($data['email'])['0']) ) + if( !empty( $data ) && !isset($current_email[0])) { if( $this->models->getCustomers()->UpdateData( $data, $id ) ) { -- libgit2 0.21.4