Copied to clipboard

Flag this post as spam?

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

  • Ryan 34 posts 136 karma points
    Apr 08, 2015 @ 15:44

    Editing Umbraco Login Cookie

    Hi all,

    I have situation where one member has access to content based on there location, basically one member can have many locations. In simple terms I'm trying to edit the cookie that is created once a member has logged in ( I want to add the location). I've seen the SetAuthCookie function (below) but I'm not completely sure I can manipulate this to do what I need or if I should just create a new cookie?. If anyone can give me a kick in the right direction it would be greatly appreciated.

    FormsAuthentication.SetAuthCookie(username, true);


  • Martin Griffiths 781 posts 1178 karma points c-trib
    Apr 08, 2015 @ 16:55
    Martin Griffiths

    Hi Ryan

    Use the forms authentication ticket method to construct a ticket (cookie) 

    This method allows for a small amount of userData to be stored in the ticket which you can read back when a member logs in. A full code example is included in the link, further down the page. This is standard forms authentication stuff, which more recent versions of Umbraco membership use ootb.


  • Ryan 34 posts 136 karma points
    Apr 08, 2015 @ 17:01

    Hi Martin,

    Thanks for the link, just what I'm after!

Please Sign in or register to post replies

Write your reply to: