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