Exemplo n.º 1
0
 public ActionResult ResetPasswordConfirmation(ResetPasswordConfirmViewModel viewModel)
 {
     /*Checks that the password and confirmed password are present, that they match and that the
     password is between 6 and 100 characters.*/
     if (ModelState.IsValid)
     {
         //Kollar om det lyckades att återställa lösenordet och genomför återställningen.
         if (WebSecurity.ResetPassword(viewModel.Token, viewModel.NewPassword))
         {
             return View("ResetPasswordSuccess");
         }
         return View("ResetPassworFailure");
     }
     return View(viewModel);
 }
Exemplo n.º 2
0
 public ActionResult ResetPasswordConfirmation(string id)
 {
     ResetPasswordConfirmViewModel viewModel = new ResetPasswordConfirmViewModel { Token = id };
     return View(viewModel);
 }