Commit f3e5d8a39f425d74e7f7a68427319a681137c964

Authored by Alex Savenko
1 parent f7edd1f3

customer update

Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
src/app/backend/controllers/CustomersController.php
... ... @@ -80,8 +80,9 @@ class CustomersController extends \Phalcon\Mvc\Controller
80 80 $data['password'] = $this->common->hashPasswd($data['password']);
81 81 }
82 82  
  83 + $current_email = $this->models->getCustomers()->getCustomerByEmail($data['email']);
83 84  
84   - if( !isset($this->models->getCustomers()->getCustomerByEmail($data['email'])['0']) )
  85 + if( !empty( $data ) && !isset($current_email[0]))
85 86 {
86 87 if( $this->models->getCustomers()->UpdateData( $data, $id ) )
87 88 {
... ...