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);
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
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);
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)