Jump to:

23001 Posts in 11702 Topics by 2827 members

General Questions

SilverStripe Forums » General Questions » Custom action uplon logout

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 617 Views
  • DeklinKelly
    Avatar
    Community Member
    196 Posts

    Custom action uplon logout Link to this post

    I want to trigger a certain action whenever a user logs out.

    I want to destroy the cookie XYZ.

    Where should I put this?

    setcookie("XYZ", null, -1);

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Custom action uplon logout Link to this post

    There is a extension hook in Member::logOut(). If you create a decorator for your Member class and implement the memberLoggedOut() function that will be called every time a member logs out (though it doesn't cover the case of session expiring)

    617 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.