Auto logout Auto logout
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Auto logout

Started by mister2k, October 13, 2008, 09:59:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mister2k

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

Joachim Müller

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.

amitbhalerao

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..

amitbhalerao

Quotethis 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..
Quotefunction sesison_extraction()
should be.
Quotefunction session_extraction()

-Amit