Forum

Thread tagged as: Question, Forum

Perch Members Session End

Hi guys,

Any ideas on how I can get sessions to end for my logged in users after a period of time or when they close their browser?

Conor

Conor Harkins

Conor Harkins 0 points

  • 4 years ago

I have tried that solution and it does not seem to work if you set the session time to 0. And it seems to be set within addons/apps/perch_members/runtime.php

Any ideas on how I can set this to 0 so that when the browser is closed the sessions ends?

Drew McLellan

Drew McLellan 2638 points
Perch Support

You can use the configuration variable PERCH_MEMBERS_SESSION_TIME to set the session time.

I have tried that but when I try to login it just stays on the login page and does not allow me access to my restricted pages. If I set it to 1 however it works fine.

Drew McLellan

Drew McLellan 2638 points
Perch Support

What value are you setting it to when it doesn't work?

If I change to 0 it does not allow me to login.

Drew McLellan

Drew McLellan 2638 points
Perch Support

That's correct. Your session would expire immediately.

I read on one of the other threads that you replied to and you said to set it to 0 if you wanted the session to expire on browser window close..?

Is there a way to achieve this rather than have it set to 1 at a minimum?

Drew McLellan

Drew McLellan 2638 points
Perch Support

It needs to be a value with a unit. 1 HOUR, 5 DAYS, 3 MONTHS etc

Ahhh... I see...

I shall try that tonight. Thanks Drew!