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.
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 asp.net forms authentication stuff, which more recent versions of Umbraco membership use ootb.
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.
Thanks
Hi Ryan
Use the forms authentication ticket method to construct a ticket (cookie) https://msdn.microsoft.com/en-us/library/kybcs83h(v=vs.110).aspx
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 asp.net forms authentication stuff, which more recent versions of Umbraco membership use ootb.
Martin.
Hi Martin,
Thanks for the link, just what I'm after!
is working on a reply...