XF 2.3 How to extend admin session for a week in config.php?

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).
 
Top Bottom