Use SESSION_DURATION option to define the session lifetime stored in the
database The option `SESSION_DURATION` is used to define the cookie lifetime. With this change, Kanboard will try to use first `SESSION_DURATION` instead of the default `session.gc_maxlifetime` value. Fixes #4340
This commit is contained in:
parent
1c90a0ce57
commit
4adb93c1a6
|
|
@ -58,7 +58,11 @@ class SessionHandler implements SessionHandlerInterface
|
|||
#[\ReturnTypeWillChange]
|
||||
public function write($sessionID, $data)
|
||||
{
|
||||
$lifetime = time() + (ini_get('session.gc_maxlifetime') ?: 1440);
|
||||
if (SESSION_DURATION > 0) {
|
||||
$lifetime = time() + SESSION_DURATION;
|
||||
} else {
|
||||
$lifetime = time() + (ini_get('session.gc_maxlifetime') ?: 1440);
|
||||
}
|
||||
|
||||
$this->db->startTransaction();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue