Example #1
0
 public function actionCreate()
 {
     $model = new User('create_admin');
     if (isset($_POST['User'])) {
         $model->attributes = $_POST['User'];
         if ($model->validate() && $model->create_admin()) {
             $this->redirect(array('view', 'id' => $model->id));
         }
     }
     $this->render('create', array('model' => $model));
 }