$self->{authenticator}->verify_config();
+ $self->{session_timeout} *= 1;
+ $self->{session_timeout} = 8 * 60 if (!$self->{session_timeout});
+
$main::lxdebug->leave_sub();
}
$form = $main::form;
$dbh = $self->dbconnect();
- $query = qq|SELECT *, (mtime < (now() - '8h'::interval)) AS is_expired FROM auth.session WHERE id = ?|;
+ $query = qq|SELECT *, (mtime < (now() - '$self->{session_timeout}m'::interval)) AS is_expired FROM auth.session WHERE id = ?|;
$cookie = selectfirst_hashref_query($form, $dbh, $query, $session_id);
WHERE session_id IN
(SELECT id
FROM auth.session
- WHERE (mtime < (now() - '8h'::interval)))|;
+ WHERE (mtime < (now() - '$self->{session_timeout}m'::interval)))|;
do_query($main::form, $dbh, $query);
$query =
qq|DELETE FROM auth.session
- WHERE (mtime < (now() - '8h'::interval))|;
+ WHERE (mtime < (now() - '$self->{session_timeout}m'::interval))|;
do_query($main::form, $dbh, $query);
# Der Name des Cookies kann geändert werden, sofern gewünscht.
# $self->{cookie_name} = 'lx_office_erp_session_id';
+# Die Zeitspanne, bis eine inaktive Session ungültig wird, kann
+# hier geändert werden. Der Standardwert ist acht Stunden.
+# Die Angabe ist in Minuten.
+# $self->{session_timeout} = 8 * 60;
+
1;