Example #1
0
 public function beforeRender()
 {
     parent::beforeRender();
     $roles = array();
     $roles[] = 'Пользователь';
     $rolelist = Role::find('role_id  in (select role_id from system_user_role where user_id  = ' . $this->user->user_id . ')');
     if (count($rolelist) > 0) {
         foreach ($rolelist as $role) {
             $roles[] = $role->description;
         }
     }
     $this->userroles->setText(implode('<br>', $roles), true);
 }