From e89ed0cd1dad97a1ddf7feb1369ee918c00a3713 Mon Sep 17 00:00:00 2001 From: Alexandr Kozhevnikov Date: Tue, 30 Apr 2019 12:58:59 +0300 Subject: [PATCH] prevent form resubmission on page refresh --- controllers/DefaultController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/controllers/DefaultController.php b/controllers/DefaultController.php index f46b7f1..dc4e17d 100644 --- a/controllers/DefaultController.php +++ b/controllers/DefaultController.php @@ -387,6 +387,7 @@ public function actionResend() // set flash (which will show on the current page) Yii::$app->session->setFlash("Resend-success", Yii::t("user", "Confirmation email resent")); + return $this->refresh(); } return $this->render("resend", compact("model")); @@ -447,6 +448,7 @@ public function actionForgot() // set flash (which will show on the current page) Yii::$app->session->setFlash("Forgot-success", Yii::t("user", "Instructions to reset your password have been sent")); + return $this->refresh(); } return $this->render("forgot", compact("model")); @@ -483,4 +485,4 @@ public function actionReset($token) return $this->render('reset', compact("user", "success")); } -} \ No newline at end of file +}