/** * Manages all models. */ public function actionAdmin() { $model = new AdminUser('search'); $model->unsetAttributes(); // clear any default values if (isset($_GET['AdminUser'])) { $model->attributes = $_GET['AdminUser']; } $this->render('admin', array('model' => $model)); }
/** * Manages all models. */ public function actionAdmin() { $model = new AdminUser('search'); $model->unsetAttributes(); // clear any default values $info = null; if (isset($_GET['AdminUser'])) { $info = $_GET['AdminUser']; $model->attributes = $info; } if (isset($info['userRole']) && !empty($info['userRole'])) { $model->userRole = $info['userRole']; } $this->render('admin', array('model' => $model)); }