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); }
public ActionResult ResetPasswordConfirmation(string id) { ResetPasswordConfirmViewModel viewModel = new ResetPasswordConfirmViewModel { Token = id }; return View(viewModel); }