public ResetPasswordWithToken ( string username, string token, string newPassword ) : bool | ||
username | string | |
token | string | |
newPassword | string | |
return | bool |
public virtual ActionResult ResetPassword(string username, string token, PasswordResetViewModel model) { // We don't want Login to have us as a return URL // By having this value present in the dictionary BUT null, we don't put "returnUrl" on the Login link at all ViewData[Constants.ReturnUrlViewDataKey] = null; ViewBag.ResetTokenValid = UserService.ResetPasswordWithToken(username, token, model.NewPassword); if (!ViewBag.ResetTokenValid) { ModelState.AddModelError("", "The Password Reset Token is not valid or expired."); return(View(model)); } return(RedirectToAction(MVC.Users.PasswordChanged())); }