Copied to clipboard

Flag this post as spam?

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


  • Dan Mothersole 22 posts 109 karma points
    Apr 28, 2014 @ 16:06
    Dan Mothersole
    0

    Umbraco 7.1.1 UserService .Savepassword

    Hi,

    I am trying to perform password resets from code but get an error when calling the UserService.SavePassword method.

    My code.

    var user = userService.GetUserById(model.UserId);

    userService.SavePassword(user, model.NewPassword);

    This give me the following error - When using a non-Umbraco membership provider you must change the user password by using the MembershipProvider.ChangePassword method

    Now as far as I am aware I am using the UmbracoProvider.

    I looked at the source as can see it is doing a check and I must be failed this check - Do i need to be calling the password reset method elsewhere?

    var provider = MembershipProviderExtensions.GetUsersMembershipProvider();
            if (provider.IsUmbracoMembershipProvider())
    
  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies