Copied to clipboard

Flag this post as spam?

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


  • wen hao 5 posts 76 karma points
    Oct 12, 2016 @ 15:53
    wen hao
    0

    Umbraco Membership Validate User

    Version: Umbraco 7.5.2

    I have created a user under Member section and given a password. When I tried to used the following code to validate the user, it returns fail.

    Umbraco.Web.Security.Providers.MembersMembershipProvider mp = new Umbraco.Web.Security.Providers.MembersMembershipProvider();
    var v = mp.ValidateUser("[email protected]", "pass1234");
    

    From the backend, I noticed that the user is locked out and failed attempt password is 1. I only triggered the validate user once.

    I have retested by reset the user password from backoffice, still I'm getting the false result.

    Am I missing anything when validating user programatically?

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Oct 13, 2016 @ 13:11
    Dennis Aaen
    0

    Hi Wen,

    When you are using Umbraco 7.5.2, I think that you have a look at the member service.

    https://our.umbraco.org/documentation/reference/management/services/memberservice

    Hope this helps,

    /Dennis

  • Timo Perplex 13 posts 145 karma points c-trib
    Oct 13, 2016 @ 13:43
    Timo Perplex
    0

    We usually validate the credentials using the following line:

    Membership.ValidateUser(model.EmailAddress, model.Password)
    

    Where Membership is in the "System.Web.Security" namespace

Please Sign in or register to post replies

Write your reply to:

Draft