Esempio n. 1
0
 public function actionSettings()
 {
     $model = new ChangePassword();
     if ($model->load(Yii::$app->request->post()) && $model->changePassword(Yii::$app->user->identity)) {
         Yii::$app->session->setFlash('success', 'Password is successfully changed.');
         return $this->goHome();
     } else {
         return $this->render('settings', ['model' => $model]);
     }
 }