Hello everyone,
I have been working on the forgottenPassword almost 8 hours now but still no find solution to sent successful message after email sent the reset password link to customer email. I am trying to sent the message to display after email sent and redirect. I used Viewbag , TempData, Session , but no luck the value is always null, here is my code
- [HttpPost]
- [ValidateAntiForgeryToken]
- public ActionResult HandleForgottenPassword(ForgottenPasswordViewModel model)
- {
- if (!ModelState.IsValid)
- {
- ModelState.AddModelError("ForgottenPasswordForm.", "No member found");
- return PartialView("ForgottenPassword", model);
- }
- else
- {
- EmailHelper email = new EmailHelper();
- email.SendResetPasswordEmail(findMember.Email,
- expiryTime.ToString("ddMMyyyyHHmmssFFFF"));
- TempData["Success"] = " A link to reset your password has been sent. Please Check your email."
- return RedirectToCurrentUmbracoPage();
- }
///////// Here is my view
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@if (Request.HttpMethod == "POST")
{
@Html.Partial("_ForgottenPassword", this.GetModel<ARS.ViewModels.ForgottenPasswordViewModel>())
}
else
{
@Html.Action("RenderForgottenPassword", "AuthSurface")
}
Thank you in advance
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/48751-how-to-sent-successful-message-after-reset-password-link-sent-to-email