Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tim 66 posts 89 karma points
    Mar 22, 2012 @ 18:25
    Tim
    0

    ResetPassword Membership doesn't work

    Hi,

    I've searched endless forums on this and cannot find an answer.

    I'm simply trying to reset a users password and then email the password to the user.To simplify If i can simply reset the password I'd be really happy. The password is hashed.

    My code

    MembershipUser u = Membership.Providers["UsersMembershipProvider"].GetUser("tim", false);

    u.ResetPassword();

    webconfig:

    <add name="UsersMembershipProvider" type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false"  enablePasswordReset="true" requiresQuestionAndAnswer="false" passwordFormat="Hashed"   minRequiredPasswordLength="3" minRequiredNonalphanumericCharacters="0" />

    When I check the db the pw hasn't changed.

    Any help would be great. i can see the ResetPassword does return a string, so no idea why it doesnt enter this into the db.

    Thanks

    Tim

  • Rodion Novoselov 694 posts 859 karma points
    Mar 22, 2012 @ 20:23
    Rodion Novoselov
    0

    Hi. It seems that the UserMembershipProvider in fact misses updating the password and just generates and returns a new one. Perhaps it should be considered as a bug. You need to change the password to the generated one on your own using extra code. Contrary to users for members resetting the password works well as I know.

Please Sign in or register to post replies

Write your reply to:

Draft