]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commit - settings/user-edit.php
Add per-user session timeout setting (under Settings 'Accounts' -> select acc).
authorBram Matthys <redacted>
Fri, 21 Apr 2023 17:20:07 +0000 (19:20 +0200)
committerBram Matthys <redacted>
Fri, 21 Apr 2023 17:23:11 +0000 (19:23 +0200)
commitd3e3ec08fc18333b563857148039bcbf80726625
treed49af1c66266f4fd1096467fb7bfc2c6a35ccb65
parentaba9dd247e44c365aeaaa343de0d00c84aa2f478
Add per-user session timeout setting (under Settings 'Accounts' -> select acc).
There's a small catch-22 with sessions in the sense that we must set the cookie
timeout before we start the session, and thus before we know which user it is,
and thus before we know the preferred maximum session time.
So we set the cookie with a timeout of 86400 (1 day), since we don't really use
the cookie anyway, we use the /api/timeout.php script and the
$_SESSION['last-activity'] and $_SESSION['session_timeout'] variables

This also moves all the session_start() stuff to a single function that is
called only called at two places (in upper layer, not like by sql or file auth)

Settings - Accounts - acc: horizontally align the settings fields.
Classes/class-paneluser.php
api/timeout.php
cfg/defines.php
common.php
login/index.php
plugins/file_auth/file_auth.php
plugins/sql_auth/sql_auth.php
settings/user-edit.php