/// <summary> /// Resets the user's password /// </summary> /// <returns></returns> public ActionResult ForgotPasswordSubmission() { try { int personID = personDAL.GetIDByEmail(Request.Form["confirmEmail"]); if (personID == 0) { ViewBag.noEmail = "No user with that email."; return(View("ForgotPassword")); } Person person = personDAL.GetPersonByID(personID); this.SendResetPasswordEmail(person); return(RedirectToAction("Login")); } catch { ViewBag.noEmail = "No user with that email."; return(View("ForgetPassword")); } }