public function actionPasswordChange() { $user = $this->findModel(); $model = new PasswordChangeForm($user); if ($model->load(Yii::$app->request->post()) && $model->changePassword()) { Yii::$app->getSession()->setFlash('success', Module::t('module', 'FLASH_PASSWORD_CHANGE_SUCCESS')); return $this->redirect(['index']); } else { return $this->render('passwordChange', ['model' => $model]); } }