Beispiel #1
0
 /**
  * @return string|\yii\web\Response
  */
 public function actionChangePassword()
 {
     $model = new ChangePasswordForm();
     if ($model->load(\Yii::$app->request->post()) && $model->changePassword()) {
         return $this->redirect(['details']);
     }
     return $this->render('change_password', ['model' => $model]);
 }
Beispiel #2
0
 public function actionChangePassword()
 {
     $user = $this->findModel();
     $model = new ChangePasswordForm($user);
     if ($model->load(Yii::$app->request->post()) && $model->changePassword()) {
         return $this->redirect(['index']);
     } else {
         return $this->render('changePassword', ['model' => $model]);
     }
 }