Commit af91d322a7bdb71b5e1adc7a705c9b30d1b7168d

Authored by Alex Savenko
1 parent 44675e95

special_users_id remove bug fix

src/app/backend/controllers/CustomersController.php
... ... @@ -80,9 +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 + $current_customer = $this->models->getCustomers()->getCustomerByEmail($data['email']);
84 84  
85   - if( !empty( $data ) && isset($current_email[0]))
  85 + if( !empty( $data ) && isset($current_customer[0]))
86 86 {
87 87 if( $this->models->getCustomers()->UpdateData( $data, $id ) )
88 88 {
... ...
src/app/backend/views/customers/addEdit.php
... ... @@ -42,8 +42,8 @@
42 42 <div class="input"><select name="special_users" id="group">
43 43 <?php if(isset( $special_users ) && !empty( $special_users)) {
44 44 foreach($special_users as $group){
45   - if(isset( $page['0']['groups'] ) && !empty( $page['0']['groups'])):?>
46   - <option value="<?= $group['id']?>"<?= ($group['id']==$page['0']['groups'])?"selected":''?>><?= $group['name']?></option>
  45 + if(isset( $page['0']['special_users_id'] ) && !empty( $page['0']['special_users_id'])):?>
  46 + <option value="<?= $group['id']?>"<?= ($group['id']==$page['0']['special_users_id'])?"selected":''?>><?= $group['name']?></option>
47 47 <?php else: ?>
48 48 <option value="<?= $group['id']?>"><?= $group['name']?></option>
49 49 <?php endif;
... ...