Skip to content

Commit

Permalink
Merge pull request #211 from onmotion/patch-1
Browse files Browse the repository at this point in the history
prevent form resubmission on page refresh
  • Loading branch information
amnah authored May 2, 2019
2 parents 33c7a66 + e89ed0c commit 4f46064
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion controllers/DefaultController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down Expand Up @@ -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"));
Expand Down Expand Up @@ -483,4 +485,4 @@ public function actionReset($token)

return $this->render('reset', compact("user", "success"));
}
}
}

0 comments on commit 4f46064

Please sign in to comment.