public async Task <TranStatus> ResetPasswordSales(string Token, ResetPasswordAdminModel model) { using (resetpasswordRepository = new ResetPasswordRepository()) { return(await resetpasswordRepository.ResetPasswordSales(Token, model)); } }
public void ResetPassword(string email) { var mgr = new ResetPasswordRepository(); PasswordToken p = mgr.CreateToken(email); User u = mgr.GetUser(email); SendPasswordEmail(p.guid, u.FullName, u.Email); }
public ActionResult ResetAuthPassword(string password, int userid) { var mgr = new UserAuthRepository(); var rmgr = new ResetPasswordRepository(); mgr.AddAction(userid, "reset password", DateTime.Now); rmgr.DeleteToken(userid); mgr.UpdatePassword(password, userid); return(RedirectToAction("Login")); }
public ActionResult ResetAuth(string token) { if (token == null) { return(RedirectToAction("ForgotPassword")); } ; var mgr = new ResetPasswordRepository(); bool isValid = mgr.CheckTokenValidity(token); if (isValid) { User u = mgr.GetUserFromToken(token); return(View(u.Id)); } else { return(RedirectToAction("InvalidToken")); } }
public AccountController() { repo = new UserRepository(); repoForEmail = new UserForConfirmedEmailRepository(); repoReset = new ResetPasswordRepository(); }