public function actionProfile($id) { $model = new ProfileForm(); $model->setType($id); if (isset($_POST['ProfileForm'])) { $model->attributes = $_POST['ProfileForm']; if ($model->validate() && $model->change()) { if ($id == 'pass') { Yii::app()->user->setFlash('notify', array('type' => 'success', 'message' => Yii::t('user', 'Password successfully changed'))); } else { Yii::app()->user->setFlash('notifyTO', array('type' => 'success', 'message' => Yii::t('user', 'Time zone successfully changed'))); } $this->render('profile', array('model' => $model)); Yii::app()->end(); } } $this->render('profile', array('model' => $model)); }