15 public function getJsonResponse($sessionId)
25 include_once
'Services/JSON/classes/class.ilJsonUtil.php';
27 $response = array(
'remind' =>
false);
30 SELECT expires, user_id, data
32 WHERE session_id = %s',
41 $response[
'message'] =
'The determined session data is not unique.';
47 $response[
'message'] =
'ILIAS could not determine the session data.';
54 $response[
'message'] =
'ILIAS could not fetch the session data or the corresponding user is no more authenticated.';
60 foreach((array)$session as $key => $entry)
62 if(strpos($key,
'_auth__') === 0)
64 $idletime = $entry[
'idle'];
69 if(
null === $idletime)
71 $response[
'message'] =
'ILIAS could not determine the idle time from the session data.';
78 $response[
'message'] =
'The session is already expired. The client should have received a remind command before.';
87 include_once
'./Services/Authentication/classes/class.ilSessionReminder.php';
89 if($remind_time > time())
92 $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);
97 switch(
$ilUser->getTimeFormat())
110 'extend_url' =>
'./ilias.php?baseClass=ilPersonalDesktopGUI',
124 return $expiretime < time();
133 return is_array(
$data) && isset(
$data[
'user_id']) &&
$data[
'user_id'] > 0 &&
$data[
'user_id'] != ANONYMOUS_USER_ID;
@classDescription Date and time handling
static encode($mixed, $suppress_native=false)
getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
isAuthenticatedUsrSession($data)
isSessionAlreadyExpired($expiretime)
static getIdleValue($fixedMode=false)
Returns the idle time in seconds.
static unserializeSession($data)
Returns the unserialized ILIAS session data.