Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

Custom action uplon logout

Go to End

2 Posts   1340 Views


Community Member, 197 Posts

18 August 2011 at 12:41pm

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);


Forum Moderator, 5523 Posts

19 August 2011 at 1:11pm

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)