Definition at line 21 of file class.ilSessionControl.php.
◆ checkAdministrationPermission()
static ilSessionControl::checkAdministrationPermission |
( |
int |
$a_user_id | ) |
|
|
staticprivate |
Definition at line 166 of file class.ilSessionControl.php.
166 : bool
167 {
168 if (!$a_user_id) {
169 return false;
170 }
171
173
174 $rbacsystem =
$DIC[
'rbacsystem'];
175
176 $access = $rbacsystem->checkAccessOfUser(
177 $a_user_id,
178 'read,visible',
180 );
181
182 return $access;
183 }
References $DIC, and SYSTEM_FOLDER_ID.
Referenced by handleLoginEvent().
◆ debug()
static ilSessionControl::debug |
( |
string |
$a_debug_log_message | ) |
|
|
staticprivate |
◆ getExistingSessionCount()
static ilSessionControl::getExistingSessionCount |
( |
array |
$a_types | ) |
|
|
static |
◆ getSettingFields()
static ilSessionControl::getSettingFields |
( |
| ) |
|
|
static |
◆ handleLoginEvent()
static ilSessionControl::handleLoginEvent |
( |
string |
$a_login, |
|
|
ilAuthSession |
$auth_session |
|
) |
| |
|
static |
Definition at line 65 of file class.ilSessionControl.php.
65 : bool
66 {
68
69
70
71 switch (true) {
72 case isset($_ENV['SHELL']):
74 break;
75
78 break;
79
82 break;
83
84 default:
86 break;
87 }
88
90 self::debug(__METHOD__ .
' --> update sessions type to (' . $type .
')');
91
92 return true;
93 }
static _lookupId(string|array $a_user_str)
const int SESSION_TYPE_ANONYM
const int SESSION_TYPE_USER
static checkAdministrationPermission(int $a_user_id)
const int SESSION_TYPE_SYSTEM
static debug(string $a_debug_log_message)
const int SESSION_TYPE_ADMIN
static set(string $a_var, $a_val)
Set a value.
References $user_id, ilObjUser\_lookupId(), ANONYMOUS_USER_ID, checkAdministrationPermission(), debug(), SESSION_TYPE_ADMIN, SESSION_TYPE_ANONYM, SESSION_TYPE_SYSTEM, SESSION_TYPE_USER, and ilSession\set().
Referenced by ilAuthFrontend\handleAuthenticationSuccess().
◆ handleLogoutEvent()
static ilSessionControl::handleLogoutEvent |
( |
| ) |
|
|
static |
◆ isValidSession()
static ilSessionControl::isValidSession |
( |
string |
$a_sid | ) |
|
|
staticprivate |
Definition at line 121 of file class.ilSessionControl.php.
121 : bool
122 {
124
126
127 $query = 'SELECT session_id, expires FROM usr_session ' .
128 'WHERE session_id = %s';
129
130 $res =
$ilDB->queryF($query, [
'text'], [$a_sid]);
131
132 $ts = time();
133
134 $sessions = [];
135
137 if ($row['expires'] > $ts) {
138 self::debug(__METHOD__ .
' --> Found a valid session with id (' . $a_sid .
')');
139 $sessions[] = $row;
140 } else {
141 self::debug(__METHOD__ .
' --> Found an expired session with id (' . $a_sid .
')');
142 }
143 }
144
145 if (count($sessions) === 1) {
146 self::debug(__METHOD__ .
' --> Exact one valid session found for session id (' . $a_sid .
')');
147
148 return true;
149 }
150
151 if (count($sessions) > 1) {
152 self::debug(__METHOD__ .
' --> Strange!!! More than one sessions found for given session id! (' . $a_sid .
')');
153 } else {
154 self::debug(__METHOD__ .
' --> No valid session found for session id (' . $a_sid .
')');
155 }
156
157 return false;
158 }
References $DIC, $ilDB, $res, and debug().
◆ removeSessionCookie()
static ilSessionControl::removeSessionCookie |
( |
| ) |
|
|
staticprivate |
◆ $session_types_controlled
array ilSessionControl::$session_types_controlled |
|
static |
◆ $session_types_not_controlled
array ilSessionControl::$session_types_not_controlled |
|
staticprivate |
Initial value:= [
]
const int SESSION_TYPE_UNKNOWN
session types from which one is assigned to each session
all session types that will be involved when count of sessions will be determined or when idleing sessions will be destroyed
Definition at line 59 of file class.ilSessionControl.php.
◆ $setting_fields
list< string > ilSessionControl::$setting_fields |
|
staticprivate |
◆ DEFAULT_ALLOW_CLIENT_MAINTENANCE
const int ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE = 1 |
◆ DEFAULT_MIN_IDLE
const int ilSessionControl::DEFAULT_MIN_IDLE = 15 |
◆ SESSION_TYPE_ADMIN
const int ilSessionControl::SESSION_TYPE_ADMIN = 2 |
|
private |
◆ SESSION_TYPE_ANONYM
const int ilSessionControl::SESSION_TYPE_ANONYM = 4 |
|
private |
◆ SESSION_TYPE_KEY
const string ilSessionControl::SESSION_TYPE_KEY = 'SessionType' |
|
private |
◆ SESSION_TYPE_SYSTEM
const int ilSessionControl::SESSION_TYPE_SYSTEM = 1 |
|
private |
◆ SESSION_TYPE_UNKNOWN
const int ilSessionControl::SESSION_TYPE_UNKNOWN = 0 |
|
private |
◆ SESSION_TYPE_USER
const int ilSessionControl::SESSION_TYPE_USER = 3 |
|
private |
The documentation for this class was generated from the following file: