Advertisement
Guest User

Untitled

a guest
Aug 1st, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. MembershipUser scUser = Membership.GetUser(model.UserName);
  2. if (scUser != null)
  3. {
  4.  
  5. string oldPassword = scUser.ResetPassword();
  6.  
  7.  
  8. using (new SecurityDisabler())
  9. {
  10. if (scUser.ChangePassword(oldPassword, model.Password))
  11. {
  12. return Json("successfully changed password",JsonRequestBehavior.AllowGet);
  13. }
  14. }
  15.  
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement