1<?
php declare(strict_types=1);
 
   15    public function getJsonResponse(
string $sessionIdHash) : 
string 
   26        $ilClientIniFile = 
$DIC[
'ilClientIniFile'];
 
   28        $GLOBALS[
'DIC']->logger()->auth()->debug(
'Session reminder call for session id hash: ' . $sessionIdHash);
 
   37                SELECT expires, user_id, data 
   39                WHERE MD5(session_id) = %s 
   48            $response[
'message'] = 
'ILIAS could not determine the session data.';
 
   53            $response[
'message'] = 
'The determined session data is not unique.';
 
   59            $response[
'message'] = 
'ILIAS could not fetch the session data or the corresponding user is no more authenticated.';
 
   63        $expirationTime = 
$data[
'expires'];
 
   64        if (
null === $expirationTime) {
 
   65            $response[
'message'] = 
'ILIAS could not determine the expiration time from the session data.';
 
   70            $response[
'message'] = 
'The session is already expired. The client should have received a remind command before.';
 
   77        $reminderTime = $expirationTime - ((int) max(
 
   79            (
float) 
$ilUser->getPref(
'session_reminder_lead_time')
 
   81        if ($reminderTime > time()) {
 
   83            $response[
'message'] = 
'Lead time not reached, yet. Current time: ' .
 
   84                date(
'Y-m-d H:i:s', time()) . 
', Reminder time: ' . date(
'Y-m-d H:i:s', $reminderTime);
 
   89        switch (
$ilUser->getTimeFormat()) {
 
  101            'extend_url' => 
'./ilias.php?baseClass=ilDashboardGUI',
 
  102            'txt' => str_replace(
 
  106                    $lng->txt(
'session_reminder_alert'),
 
  108                    $formatted_expiration_time,
 
  124        return $expirationTime < time();
 
  135            isset(
$data[
'user_id']) &&
 
  136            (
int) 
$data[
'user_id'] > 0 &&
 
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
An exception for terminatinating execution or to throw for unit testing.
static secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
@classDescription Date and time handling
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
isAuthenticatedUsrSession(?array $data)
isSessionAlreadyExpired(int $expirationTime)
static enableWebAccessWithoutSession($enable_web_access_without_session)
foreach($_POST as $key=> $value) $res