public function actionUpdate() { $user = $this->findModel(); $model = new ProfileUpdateForm($user); if ($model->load(Yii::$app->request->post()) && $model->update()) { return $this->redirect(['index']); } else { return $this->render('update', ['model' => $model]); } }