Пример #1
0
 public async Task <TranStatus> ResetPasswordSales(string Token, ResetPasswordAdminModel model)
 {
     using (resetpasswordRepository = new ResetPasswordRepository())
     {
         return(await resetpasswordRepository.ResetPasswordSales(Token, model));
     }
 }
Пример #2
0
        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();
 }