Copied to clipboard

Flag this post as spam?

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


  • Ivan 139 posts 302 karma points
    Apr 08, 2012 @ 15:40
    Ivan
    0

    Can't change member hashed password using MembershipProvider

    Hi.

    I am trying to change member password using my custom CreateRandomPassword function.

    My web.config file:

    <add name="UmbracoMembershipProvider" type="umbraco.providers.members.UmbracoMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Another Type" passwordFormat="Hashed" />

    My code:

    MembershipUser user = Membership.GetUser(cuw.UserName);
    String oldPass = user.ResetPassword();
    String newPass =  CreateRandomPassword(10);
    user.ChangePassword(oldPass, newPass);

    With my code, the password asigned to member gets oldPass value instead of newPass.

    What am i doing wrong?

    Thanks for your help!
    Ivan

Please Sign in or register to post replies

Write your reply to:

Draft