public ActionResult ResetPassword(HelpDeskEntities.Account.ResetPassword cp) { var msg = ""; if (GenericClass.VerifyOTP(Session["otp"], cp.otp, out msg)) { var flag = AccBAL.ResetPassword(cp, out msg); if (flag) { Session["otp"] = null; TempData["succMsg"] = msg; return(RedirectToAction("login")); } else { TempData["errMsg"] = msg; cp.otp = ""; return(View(cp)); } } else { cp.otp = ""; TempData["errMsg"] = msg; return(View(cp)); } }
public ActionResult ResetPassword(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest, "User Id not passed in request")); } var u = uBAL.GetUserByUID(Convert.ToInt32(id)); HelpDeskEntities.Account.ResetPassword cp = new HelpDeskEntities.Account.ResetPassword() { UserEmail = u.EmailID }; return(View(cp)); }