Copied to clipboard

Flag this post as spam?

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


  • Tomasz Kowalski 135 posts 445 karma points
    Jan 30, 2014 @ 14:13
    Tomasz Kowalski
    0

    Razor - front-end login with back-end user credentials

    Hi,

    Umbraco 6.1.6.  I know how to make login for members, but now I would like to make login for backend users, so there is no need to create members for each backend user.

    I have tried to use umbraco.providers.UsersMembershipProvider(), but with no luck. ValidateUser(username, password) returns always False:

    string username = Request["username"];
    string password = Request["password"];
    var ump = new umbraco.providers.UsersMembershipProvider();
    if (ump.ValidateUser(username, password))
     {        ...        }

    Maybe am I missing something? Or this is all wrong?

    Any help will be appreciated.

    Kind regards

    Thomas

     

  • Benas Brazdziunas 34 posts 156 karma points c-trib
    Feb 19, 2014 @ 00:18
    Benas Brazdziunas
    0

    Good place to start is:

    http://our.umbraco.org/wiki/reference/api-cheatsheet/working-with-members

    Member m = Member.GetMemberFromLoginNameAndPassword("username", "password");

  • 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