/**
  * Lists all models.
  */
 public function actionIndex()
 {
     parent::actionIndex();
     $this->lookupdata();
     $model = new Usergroup('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Usergroup'])) {
         $model->attributes = $_GET['Usergroup'];
     }
     if (isset($_GET['pageSize'])) {
         Yii::app()->user->setState('pageSize', (int) $_GET['pageSize']);
         unset($_GET['pageSize']);
         // would interfere with pager and repetitive page size change
     }
     $this->render('index', array('model' => $model, 'useraccess' => $this->useraccess, 'groupaccess' => $this->groupaccess));
 }
 /**
  * Manages all models.
  */
 public function actionAdmin()
 {
     $model = new Usergroup('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['Usergroup'])) {
         $model->attributes = $_GET['Usergroup'];
     }
     if ($this->isExportRequest()) {
         $this->exportCSV($model->search(), array('user.name', 'group.name'));
     }
     $this->render('admin', array('model' => $model));
 }