Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Auto logout  (Read 2268 times)

0 Members and 1 Guest are viewing this topic.

mister2k

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Auto logout
« on: October 13, 2008, 09:59:59 pm »

Is there any possibility in settings or a script or anything else that users auto logout after x minutes?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Auto logout
« Reply #1 on: October 14, 2008, 08:18:06 am »

You could modify the life-time of the cookie, but usually the session lasts at least untill the browser is closed. A real by-minute logout would have to be coded: you'd have to record the time the user logged in in the database and then perform a check against that date on each action the user makes.
Out of the box, there is no such functionality, nor do I think that a mod exists that does what you're up to.
Logged

amitbhalerao

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Auto logout
« Reply #2 on: October 14, 2008, 09:22:32 am »

When a user logs in, there is an entry in ..sessions table with the login time and it is updated(on user activities). If the logged in user is inactive for an hour, this entry gets deleted and user auto logs out..

If this is to be changed, we can add..

define('CPG_AUTO',1800);
after
define('CPG_HOUR',3600);
in include/logger.inc.php

AND

replace CPG_HOUR with CPG_AUTO..
in bridge/coppermine.inc.php (find $session_life_time in function sesison_extraction())..

This will make the default timeout 30 min..
Logged

amitbhalerao

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Auto logout
« Reply #3 on: October 14, 2008, 09:43:20 am »

Quote
this entry gets deleted and user auto logs out..
The entry is not deleted. In fact the user_id is reset to '0' (guest).

Sorry for the spell mistakes..
Quote
function sesison_extraction()
should be.
Quote
function session_extraction()

-Amit
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.