public ActionResult ResetPassword(ResetPasswordModel model, string ticket)
        {
            if (string.IsNullOrEmpty(ticket))
            {
                return RedirectToRoute("Default");
            }

            if (ModelState.IsValid)
            {
                var randomCode = RandomStringGenerator.RandomString();
                var encCode = TripleDES.EncryptString(randomCode);
                var hashedPassword = PasswordHelper.GenerateHashedPassword(model.Password, randomCode);
                if (_userRepository.ResetPassword(model.EmailAddress, model.VerificationCode, hashedPassword, encCode))
                {
                    return RedirectToRoute("AdminIndex");
                }
                ModelState.AddModelError("__FORM", "unable to reset your password");
            }

            model.Title = SettingsRepository.BlogName;
            return View(model);
        }
 public ActionResult ResetPassword(string ticket)
 {
     if (string.IsNullOrEmpty(ticket))
     {
         return RedirectToRoute("Default");
     }
     var model = new ResetPasswordModel { VerificationCode = ticket, Title = SettingsRepository.BlogName };
     return View(model);
 }