Copied to clipboard

Flag this post as spam?

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


  • Niels Sparenberg 11 posts 72 karma points
    Aug 03, 2015 @ 13:30
    Niels Sparenberg
    1

    Umbraco memberservice password validation

    Hi I'm trying to migrate members using the Umbraco Memberservice.

    My code:

    var newMember = memberService.CreateMemberWithIdentity(member.UserName, member.Email, member.FullName, member.MemberTypeAlias);
    memberService.SavePassword(newMember, member.Password);
    memberService.Save(newMember);
    

    The problem is that some of the passwords I'm transferring are unsafe like '123'. I still want to transfer them, but can't because of the following exception:

    System.Web.Security.MembershipPasswordException: Change password canceled due to password validation failure.
       at Umbraco.Core.Security.MembershipProviderBase.ChangePassword(String username, String oldPassword, String newPassword)
       at Umbraco.Core.Services.MemberService.SavePassword(IMember member, String password)
    

    How do I disable or change password validation?

  • Per Olsson 47 posts 307 karma points
    Aug 03, 2015 @ 14:52
    Per Olsson
    105

    Have a look at your web.config file. Look for:

    <membership defaultProvider="UmbracoMembershipProvider">
    ....
    </membership >
    

    Here you can set minRequiredPasswordLength and minRequiredNonalphanumericCharacters.

  • Niels Sparenberg 11 posts 72 karma points
    Aug 04, 2015 @ 08:26
    Niels Sparenberg
    0

    Cheers, overlooked minRequiredPasswordLength was set to 4

  • Rushikesh Waghamare 1 post 21 karma points
    Oct 12, 2023 @ 13:00
    Rushikesh Waghamare
    0

    How to set member password validation minimum character to 8 characters instead of 10.

Please Sign in or register to post replies

Write your reply to:

Draft