15 public function getJsonResponse($sessionId)
25 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
28 $GLOBALS[
'DIC']->logger()->auth()->debug(
'Session reminder call for: ' . $sessionId);
31 include_once
'./Services/Authentication/classes/class.ilSession.php';
34 $response =
array(
'remind' =>
false);
36 $res = $ilDB->queryF(
' 37 SELECT expires, user_id, data 39 WHERE session_id = %s',
44 $num = $ilDB->numRows(
$res);
48 $response[
'message'] =
'The determined session data is not unique.';
54 $response[
'message'] =
'ILIAS could not determine the session data.';
61 $response[
'message'] =
'ILIAS could not fetch the session data or the corresponding user is no more authenticated.';
69 $expiretime =
$data[
'expires'];
72 $response[
'message'] =
'The session is already expired. The client should have received a remind command before.';
81 if(null === $expiretime)
83 $response[
'message'] =
'ILIAS could not determine the expire time from the session data.';
89 $response[
'message'] =
'The session is already expired. The client should have received a remind command before.';
98 include_once
'./Services/Authentication/classes/class.ilSessionReminder.php';
100 if($remind_time >
time())
103 $response[
'message'] =
'Lead time not reached, yet. Current time: ' .
date(
'Y-m-d H:i:s',
time()) .
', Reminder time: ' .
date(
'Y-m-d H:i:s', $remind_time);
108 switch($ilUser->getTimeFormat())
111 $formatted_expiration_time = $dateTime->get(
IL_CAL_FKT_DATE,
'g:ia', $ilUser->getTimeZone());
116 $formatted_expiration_time = $dateTime->get(
IL_CAL_FKT_DATE,
'H:i', $ilUser->getTimeZone());
121 'extend_url' =>
'./ilias.php?baseClass=ilPersonalDesktopGUI',
135 return $expiretime <
time();
144 return is_array(
$data) && isset(
$data[
'user_id']) &&
$data[
'user_id'] > 0 &&
$data[
'user_id'] != ANONYMOUS_USER_ID;
static enableWebAccessWithoutSession($enable_web_access_without_session)
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
isAuthenticatedUsrSession($data)
static encode($mixed, $suppress_native=false)
static secondsToString($seconds, $force_with_seconds=false, $a_lng=null)
converts seconds to string: Long: 7 days 4 hour(s) ...
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
isSessionAlreadyExpired($expiretime)
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.