ILIAS
Release_4_4_x_branch Revision 61816
|
Static Public Member Functions | |
static | checkExpiredSession () |
checks for possibly expired session should be called from ilAuthUtils::__initAuth() so it's called before session_start() is called | |
static | initSession () |
mark session with type regarding to the context. | |
static | handleLoginEvent ($a_login, $a_auth) |
when current session is allowed to be created it marks it with type regarding to the sessions user context. | |
static | handleLogoutEvent () |
reset sessions type to unknown | |
static | getExistingSessionCount (array $a_types) |
returns number of valid sessions relating to given session types | |
static | getSettingFields () |
returns the array of setting fields |
Data Fields | |
const | INTERNAL_DEBUG = false |
this controls the debuggin into a separate logfile (. | |
const | DEFAULT_MAX_COUNT = 0 |
default value for settings that have not been defined in setup or administration yet | |
const | DEFAULT_MIN_IDLE = 15 |
const | DEFAULT_MAX_IDLE = 30 |
const | DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST = 1 |
const | DEFAULT_ALLOW_CLIENT_MAINTENANCE = 1 |
const | SESSION_TYPE_UNKNOWN = 0 |
session types from which one is assigned to each session | |
const | SESSION_TYPE_SYSTEM = 1 |
const | SESSION_TYPE_ADMIN = 2 |
const | SESSION_TYPE_USER = 3 |
const | SESSION_TYPE_ANONYM = 4 |
Static Public Attributes | |
static | $session_types_controlled |
Static Private Member Functions | |
static | checkCurrentSessionIsAllowed (Auth $a_auth, $a_user_id) |
checks wether the current session exhaust the limit of sessions when limit is reached it deletes "firstRequestAbidencer" and checks again when limit is still reached it deletes "oneMinIdleSession" and checks again when limit is still reached the current session will be logged out | |
static | kickOneMinIdleSession (array $a_types) |
if sessions exist that relates to given session types and idled longer than min idle parameter, this method deletes one of these sessions | |
static | kickFirstRequestAbidencer (array $a_types) |
kicks sessions of users that abidence after login so people could not login and go for coffe break ;-) | |
static | isValidSession ($a_sid) |
checks if session exists for given id and if it is still valid | |
static | removeSessionCookie () |
removes a session cookie, so it is not sent by browser anymore | |
static | checkAdministrationPermission ($a_user_id) |
checks wether a given user login relates to an user with administrative permissions | |
static | debug ($a_debug_log_message) |
logs the given debug message in ilLog |
Static Private Attributes | |
static | $setting_fields |
all fieldnames that are saved in settings table | |
static | $session_types_not_controlled |
all session types that will be involved when count of sessions will be determined or when idleing sessions will be destroyed |
Definition at line 11 of file class.ilSessionControl.php.
|
staticprivate |
checks wether a given user login relates to an user with administrative permissions
ilRbacSystem $rbacsystem
integer | $a_user_id |
Definition at line 480 of file class.ilSessionControl.php.
Referenced by handleLoginEvent().
|
staticprivate |
checks wether the current session exhaust the limit of sessions when limit is reached it deletes "firstRequestAbidencer" and checks again when limit is still reached it deletes "oneMinIdleSession" and checks again when limit is still reached the current session will be logged out
ilSetting $ilSetting ilAppEventHandler $ilAppEventHandler
Auth | $a_auth |
Definition at line 234 of file class.ilSessionControl.php.
References $_SESSION, $ilSetting, ilSessionStatistics\createRawEntry(), debug(), DEFAULT_MAX_COUNT, getExistingSessionCount(), kickFirstRequestAbidencer(), kickOneMinIdleSession(), Auth\logout(), ilUtil\redirect(), ilSession\SESSION_CLOSE_LIMIT, and ilSession\setClosingContext().
Referenced by handleLoginEvent().
|
static |
checks for possibly expired session should be called from ilAuthUtils::__initAuth() so it's called before session_start() is called
ilSetting $ilSetting ilLanguage $lng ilAppEventHandler $ilAppEventHandler
Definition at line 85 of file class.ilSessionControl.php.
References $_COOKIE, $_GET, $ilSetting, $lng, debug(), isValidSession(), ilUtil\redirect(), and removeSessionCookie().
Referenced by ilAuthUtils\_initAuth().
|
staticprivate |
logs the given debug message in ilLog
ilLog $ilLog
string | $a_debug_log_message |
Definition at line 499 of file class.ilSessionControl.php.
References $ilLog.
Referenced by checkCurrentSessionIsAllowed(), checkExpiredSession(), handleLoginEvent(), handleLogoutEvent(), initSession(), isValidSession(), kickFirstRequestAbidencer(), kickOneMinIdleSession(), and removeSessionCookie().
|
static |
returns number of valid sessions relating to given session types
ilDB $ilDB
array | $a_types |
Definition at line 317 of file class.ilSessionControl.php.
References $query, $res, $row, and DB_FETCHMODE_OBJECT.
Referenced by checkCurrentSessionIsAllowed(), and ilSessionStatisticsGUI\renderCurrentBasics().
|
static |
returns the array of setting fields
Definition at line 513 of file class.ilSessionControl.php.
References $setting_fields.
Referenced by ilSetup\checkClientSessionSettings(), ilSetupGUI\displaySessions(), ilSetup\getSessionSettings(), and ilSetup\setSessionSettings().
|
static |
when current session is allowed to be created it marks it with type regarding to the sessions user context.
when session is not allowed to be created it will be destroyed.
Definition at line 164 of file class.ilSessionControl.php.
References $_SESSION, $ilSetting, ilObjUser\_lookupId(), checkAdministrationPermission(), checkCurrentSessionIsAllowed(), debug(), SESSION_TYPE_ADMIN, SESSION_TYPE_ANONYM, SESSION_TYPE_SYSTEM, and SESSION_TYPE_USER.
Referenced by ilAuthBase\loginObserver().
|
static |
reset sessions type to unknown
Definition at line 208 of file class.ilSessionControl.php.
References $_SESSION, $ilSetting, debug(), removeSessionCookie(), and SESSION_TYPE_UNKNOWN.
Referenced by ilAuthBase\logoutObserver().
|
static |
mark session with type regarding to the context.
should be called from ilAuthBase::initAuth()
Definition at line 140 of file class.ilSessionControl.php.
References $_SESSION, $ilSetting, debug(), and SESSION_TYPE_UNKNOWN.
Referenced by ilAuthBase\initAuth().
|
staticprivate |
checks if session exists for given id and if it is still valid
ilDB $ilDB ilSetting $ilSetting
string | $a_sid |
Definition at line 421 of file class.ilSessionControl.php.
References $ilSetting, $query, $res, $row, and debug().
|
staticprivate |
kicks sessions of users that abidence after login so people could not login and go for coffe break ;-)
ilDB $ilDB ilSetting $ilSetting
Definition at line 384 of file class.ilSessionControl.php.
References $ilSetting, $query, $res, $row, ilSession\_destroy(), DB_FETCHMODE_OBJECT, debug(), and ilSession\SESSION_CLOSE_FIRST.
Referenced by checkCurrentSessionIsAllowed().
|
staticprivate |
if sessions exist that relates to given session types and idled longer than min idle parameter, this method deletes one of these sessions
ilDB $ilDB ilSetting $ilSetting
array | $a_types |
Definition at line 343 of file class.ilSessionControl.php.
References $ilSetting, $query, $res, $row, ilSession\_destroy(), DB_FETCHMODE_OBJECT, debug(), and ilSession\SESSION_CLOSE_IDLE.
Referenced by checkCurrentSessionIsAllowed().
|
staticprivate |
removes a session cookie, so it is not sent by browser anymore
Definition at line 466 of file class.ilSessionControl.php.
References debug(), and ilUtil\setCookie().
Referenced by checkExpiredSession(), and handleLogoutEvent().
|
static |
Definition at line 59 of file class.ilSessionControl.php.
Referenced by ilSession\_writeData(), ilSessionStatistics\getNumberOfActiveRawSessions(), ilSessionStatistics\getRawData(), and ilSessionStatisticsGUI\renderCurrentBasics().
|
staticprivate |
all session types that will be involved when count of sessions will be determined or when idleing sessions will be destroyed
all session types that will be ignored when count of sessions will be determined or when idleing sessions will be destroyed
Definition at line 70 of file class.ilSessionControl.php.
|
staticprivate |
all fieldnames that are saved in settings table
Definition at line 34 of file class.ilSessionControl.php.
Referenced by getSettingFields().
const ilSessionControl::DEFAULT_ALLOW_CLIENT_MAINTENANCE = 1 |
Definition at line 27 of file class.ilSessionControl.php.
Referenced by ilSetup\getSessionSettings(), ilObjUserFolderGUI\initFormGeneralSettings(), and ilObjUserFolderGUI\saveGeneralSettingsObject().
const ilSessionControl::DEFAULT_MAX_COUNT = 0 |
default value for settings that have not been defined in setup or administration yet
Definition at line 23 of file class.ilSessionControl.php.
Referenced by checkCurrentSessionIsAllowed(), ilObjUserFolderGUI\generalSettingsObject(), ilSessionStatistics\getLimitForSlot(), ilSetup\getSessionSettings(), ilSessionStatisticsGUI\renderCurrentBasics(), and ilSessionStatistics\updateLimitLog().
const ilSessionControl::DEFAULT_MAX_IDLE = 30 |
Definition at line 25 of file class.ilSessionControl.php.
Referenced by ilObjUserFolderGUI\generalSettingsObject(), ilSession\getExpireValue(), ilSession\getIdleValue(), ilSetup\getSessionSettings(), and ilSessionStatisticsGUI\renderCurrentBasics().
const ilSessionControl::DEFAULT_MAX_IDLE_AFTER_FIRST_REQUEST = 1 |
Definition at line 26 of file class.ilSessionControl.php.
Referenced by ilObjUserFolderGUI\generalSettingsObject(), ilSetup\getSessionSettings(), and ilSessionStatisticsGUI\renderCurrentBasics().
const ilSessionControl::DEFAULT_MIN_IDLE = 15 |
Definition at line 24 of file class.ilSessionControl.php.
Referenced by ilObjUserFolderGUI\generalSettingsObject(), ilSetup\getSessionSettings(), and ilSessionStatisticsGUI\renderCurrentBasics().
const ilSessionControl::INTERNAL_DEBUG = false |
this controls the debuggin into a separate logfile (.
/session.log)
Definition at line 17 of file class.ilSessionControl.php.
const ilSessionControl::SESSION_TYPE_ADMIN = 2 |
Definition at line 49 of file class.ilSessionControl.php.
Referenced by handleLoginEvent().
const ilSessionControl::SESSION_TYPE_ANONYM = 4 |
Definition at line 51 of file class.ilSessionControl.php.
Referenced by handleLoginEvent().
const ilSessionControl::SESSION_TYPE_SYSTEM = 1 |
Definition at line 48 of file class.ilSessionControl.php.
Referenced by handleLoginEvent().
const ilSessionControl::SESSION_TYPE_UNKNOWN = 0 |
session types from which one is assigned to each session
Definition at line 47 of file class.ilSessionControl.php.
Referenced by handleLogoutEvent(), and initSession().
const ilSessionControl::SESSION_TYPE_USER = 3 |
Definition at line 50 of file class.ilSessionControl.php.
Referenced by handleLoginEvent().