class SessionConfig
How long sessions and the tokens behind them last.
Every value here is answered the same way: `config.php` first, then the settings table, then the default that has always applied. Putting a value in `config.php` is therefore also a way to take it away from the admin panel — a site owner can pin session lengths where an administrator cannot loosen them, which is the point of keeping the option in a file rather than only in the database.
Constants
| DEFAULT_LIFETIME |
How long a session may sit idle before it is discarded, in minutes. |
Methods
How long tokens of the given type stay valid, in seconds, or `null` to leave the decision to the token class.
Whether any of this is pinned in `config.php`, and so cannot be changed from the admin panel.
Details
at
line 32
__construct( Config $config, SettingsRepositoryInterface $settings)
at
line 45
int|null
tokenLifetime(string $type)
How long tokens of the given type stay valid, in seconds, or `null` to leave the decision to the token class.
Zero is a real answer rather than an absent one — it means the token never expires — so it has to survive the fall through the sources below.
at
line 65
int
lifetime()
How long a session may sit idle before it is discarded, in minutes.
at
line 90
bool
cookieExpiresOnClose()
Whether session cookies should be discarded when the browser closes.
This is about the cookie, not the token behind it: the session remains valid server-side for its lifetime, but the browser stops presenting it once the window is gone. Shared computers are the usual reason to want it.
at
line 105
bool
configOverride()
Whether any of this is pinned in `config.php`, and so cannot be changed from the admin panel.