Copied to clipboard

Flag this post as spam?

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


  • Mirhat 11 posts 91 karma points
    Mar 20, 2018 @ 08:02
    Mirhat
    0

    Can't login user in custom login controller

    I am trying to make login partial with custom login controller. This function call is returning false (even if username and password are correct)

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

    Membership is from System.Web.Security namespace.

    Note: I am trying on backoffice users not members.

  • Barry Fogarty 493 posts 1129 karma points
    Mar 20, 2018 @ 09:35
    Barry Fogarty
    100

    Membership by default will use the default membership provider configured in your web.config:

    <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15">
    

    If you only need to work with backoffice users you can simply change defaultProvider to UsersMembershipProvider

    If you need to work with both users and members, you'll need to set the provider in code before you call ValidateUser.

  • Mirhat 11 posts 91 karma points
    Mar 20, 2018 @ 11:20
    Mirhat
    0

    Thank you.

    That solved my problem

Please Sign in or register to post replies

Write your reply to:

Draft