Commit 7a18ba034390bea636f049ac290e238e477ed717

Authored by Alex Savenko
1 parent 9dca8dd8

user update

Showing 1 changed file with 4 additions and 4 deletions   Show diff stats
src/app/frontend/controllers/PageController.php
@@ -15,12 +15,12 @@ @@ -15,12 +15,12 @@
15 $titlecmp = function ($a, $b) { 15 $titlecmp = function ($a, $b) {
16 return strcasecmp($a['title'], $b['title']); 16 return strcasecmp($a['title'], $b['title']);
17 }; 17 };
18 - 18 +
  19 + $users_group_name = \config::get('frontend#defaults/default_users_group');
  20 +
19 if($this->session->has('id') && $this->session->get('users_group_id') != null) { 21 if($this->session->has('id') && $this->session->get('users_group_id') != null) {
20 $users_group = $this->models->getUsersGroup()->getOneData($this->session->get('users_group_id')); 22 $users_group = $this->models->getUsersGroup()->getOneData($this->session->get('users_group_id'));
21 - $users_group_name = $users_group['0']['name'];  
22 - } else {  
23 - $users_group_name = \config::get('frontend#defaults/default_users_group'); 23 + if (isset($users_group[0]['name'])) $users_group_name = $users_group['0']['name'];
24 } 24 }
25 25
26 $catalog = $this->common->getTypeSubtype1( NULL, $this->lang_id )['catalog']; 26 $catalog = $this->common->getTypeSubtype1( NULL, $this->lang_id )['catalog'];