19 declare(strict_types=1);
48 if (isset($DIC[
'ilUser'])) {
67 (
int) $this->
settings->get(
'session_reminder_lead_time')
73 $min_value = self::MIN_LEAD_TIME;
76 if ($lead_time !== self::LEAD_TIME_DISABLED &&
77 ($lead_time < $min_value || $lead_time > $max_value)) {
78 $lead_time = self::SUGGESTED_LEAD_TIME;
81 return $lead_time !== self::LEAD_TIME_DISABLED ? min(
87 ) : self::LEAD_TIME_DISABLED;
95 'session_reminder_lead_time' 104 return max(self::MIN_LEAD_TIME, ($expires / 60) - 1);
138 !$this->
getUser()->isAnonymous() &&
139 $this->
getUser()->getId() > 0 &&
calculateSecondsUntilExpiration()
setSecondsUntilExpiration(int $seconds_until_expiration)
setCurrentTime(int $current_time)
getGlobalSessionReminderLeadTime()
getSecondsUntilReminder()
static getIdleValue()
Returns the idle time in seconds.
isEnoughTimeLeftForReminder()
static _lookupPref(int $a_usr_id, string $a_keyword)
setSecondsUntilReminder(int $seconds_until_reminder)
const int SUGGESTED_LEAD_TIME
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
int $seconds_until_expiration
setExpirationTime(int $expiration_time)
setLeadTime(int $lead_time)
calculateSecondsUntilReminder()
static getSessionExpireValue()
Returns the session expiration value.
int $seconds_until_reminder
getSecondsUntilExpiration()
__construct(private ilObjUser $user, private readonly ClockInterface $clock, private readonly ilSetting $settings)
buildValidLeadTime(int $lead_time)
const int LEAD_TIME_DISABLED