public function newUser() { $model = new sUser(); //$this->performAjaxValidation($model); if (isset($_POST['sUser'])) { $model->attributes = $_POST['sUser']; if ($model->save()) { Yii::app()->user->setFlash('success', '<strong>Great!</strong> data has been saved successfully'); $this->redirect(array('view', 'id' => $model->id)); } } return $model; }