5 include_once
'./Services/Authentication/classes/class.ilSession.php';
44 return self::$instance;
46 return self::$instance =
new self();
65 $this->
setId(session_id());
74 $this->authenticated = (int)
ilSession::get(self::SESSION_AUTH_AUTHENTICATED);
80 $this->
getLogger()->debug(
'Started new session.');
82 $this->expired =
false;
83 $this->authenticated =
false;
102 $old_session_id = session_id();
103 session_regenerate_id(
true);
104 $this->
setId(session_id());
105 $this->
getLogger()->info(
'Session regenerate id: ['.substr($old_session_id,0,5).
'] -> ['. substr($this->
getId(),0,5).
']');
115 session_regenerate_id(
true);
134 $this->authenticated = $a_status;
135 $this->user_id = $a_user_id;
160 $this->expired = $a_status;
170 $this->user_id = $a_id;
setAuthenticated($a_status, $a_user_id)
Set authenticated.
logout()
Logout user => stop session.
regenerateId()
Regenerate id.
isExpired()
Check if current is or was expired in last request.
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.
isAuthenticated()
Check if session is authenticated.
const SESSION_AUTH_AUTHENTICATED
setExpired($a_status)
Set session expired.
const SESSION_AUTH_USER_ID
getUserId()
Get authenticated user id.
init()
Start auth session.
const SESSION_AUTH_EXPIRED
setUserId($a_id)
Set authenticated user id.
__construct()
Consctructor.
static lookupExpireTime($a_session_id)
Lookup expire time for a specific session ilDB $ilDB.
isValid()
Check if current session is valid (authenticated and not expired)
validateExpiration()
Check expired value of session.
static getLogger($a_component_id)
Get component logger.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
static getInstance()
Get instance.