Copied to clipboard

Flag this post as spam?

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


  • Jonas Nilsson 137 posts 260 karma points
    Aug 22, 2013 @ 12:48
    Jonas Nilsson
    0

    Login persistence

    I have a razor script for an member login dialog and when I set FormsAuthentication.SetAuthCookie(username, false) I still get logged in when restarting the browser.

    The auth cookie is gone, but there is something with the umb_member cookie, I don't get logged on if i delete it after restarting the browser.

    Is it possible to control how the umb_member cookie is created?, change expiration?, persistence?

    Using Umbraco 4.7

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Sep 03, 2013 @ 13:12
    Sebastiaan Janssen
    0

    I don't know if that works, but a way to logout a member in the frontend that actually works would be:

            using umbraco.cms.businesslogic.member;
    
            if(umbraco.library.IsLoggedOn())
            {
                var memberId = Member.CurrentMemberId();
                Member.RemoveMemberFromCache(memberId);
                Member.ClearMemberFromClient(memberId);
            }
    
  • Jonas Nilsson 137 posts 260 karma points
    Sep 04, 2013 @ 11:31
    Jonas Nilsson
    100

    Solved it by removing the cookie persistence of umb_member in Umbraco source code.

Please Sign in or register to post replies

Write your reply to:

Draft