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

Session to timeout after xx time of inactivity


Go to End


4 Posts   5313 Views

Avatar
chillburn.com.au

Community Member, 12 Posts

27 August 2010 at 2:23pm

Edited: 27/08/2010 2:24pm

Hi Guys

I have a site that i'm currently working on and i'm trying to figure out how to set up the session so that it times out after 10 minutes of inactivity. I've had a look thru the Session class and there is a set_timeout method but this uses session_set_cookie_params which sets out a timeout time from login when the user logs in. What i'm trying to do is reset the 10 minutes timestamp for each time a logged in user has loaded a page.

i've tried doing something like this: http://php.net/manual/en/function.session-set-cookie-params.php#78930 but I cannot get it to work. Has anyone been able to achieve this.

Thanks
Gav

Avatar
novaweb

Community Member, 116 Posts

29 February 2012 at 12:32pm

Edited: 02/03/2012 2:29pm

Bump

Thought Session::set_timeout would do it but that is not dependent on activity.

Avatar
novaweb

Community Member, 116 Posts

2 March 2012 at 2:50pm

I'm sure SilverStripe used to do this by default... but doesn't seem to anymore?

(I am looking for this functionality on the front end, not just in the CMS)

Once isitbeeroclockyet has hit the green, one of you kind souls should enlighten me ;)

Avatar
novaweb

Community Member, 116 Posts

5 March 2012 at 12:08pm