Marcus Well-known member Apr 18, 2024 #1 Is there a simple configuration (like in config.php) to extend the admin session for a week ? Thanks.
Is there a simple configuration (like in config.php) to extend the admin session for a week ? Thanks.
K Kirby Well-known member Apr 18, 2024 #2 Increasing the admin session lifetime IMHO doesn't make much sense, but anyway: PHP: $c->extend('session.admin', function (\XF\Session\Session $session) { $session->setConfig(['lifetime' => 7 * 86400]); return $session; }); Keep in mind that Cookie xf_session_admin is a Session cookie, eg. it will be deleted when the browser is closed. When that happens before expiry the session can't be used any longer even though its still exists (on the server).
Increasing the admin session lifetime IMHO doesn't make much sense, but anyway: PHP: $c->extend('session.admin', function (\XF\Session\Session $session) { $session->setConfig(['lifetime' => 7 * 86400]); return $session; }); Keep in mind that Cookie xf_session_admin is a Session cookie, eg. it will be deleted when the browser is closed. When that happens before expiry the session can't be used any longer even though its still exists (on the server).