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've moved the forum!

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.

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

best way to check session


Go to End


788 Views

Avatar
martimiz

Forum Moderator, 1391 Posts

2 July 2011 at 12:40am


What would be the 'approved SilverStripe way' to check if session cookies are enabled? Is there a value that should always be present, or should I just set one myself (not I hope)?

For instance I want the securityToken to be enabled on contactforms. If there's no session I want to show some sort of message to enable cookies, instead of just showing the form and getting the 'possible CSRF attack' message on submission...