public ActionResult ResetPassword(string token, string txtPassword1, string txtPassword2) { var model = new bat.logic.ViewModels.Homepage.ResetPassword(); try { model = _passwdService.VerifyToken(token); var account = _passwdService.ChangePassword(token, txtPassword1, txtPassword2); var auth = new logic.Rules.Authentication(Request.GetOwinContext()); auth.Login(account); return(RedirectToRoute("home")); } catch (Exception ex) { ViewBag.ErrMsg = ex.Message; } return(View(model)); }
public ActionResult ResetPassword(string t) { var model = new bat.logic.ViewModels.Homepage.ResetPassword(); try { ViewData.Clear(); TempData.Clear(); Session.Clear(); var auth = new logic.Rules.Authentication(Request.GetOwinContext()); auth.Logout(); model = _passwdService.VerifyToken(t); } catch (Exception ex) { ViewBag.Response = ex.Message; } return(View(model)); }