Public Member Functions | |
| __construct () | |
| Constructor. | |
| setUseridInSession ($uid) | |
| Set the user id in the corresponding session record. | |
| setValue ($varname, $value) | |
| Assign a value to a session var. | |
| getValue ($varname) | |
| Get the value of a session var. | |
| destroy () | |
| Destroy current session. | |
Private Member Functions | |
| registerSession () | |
Register session in table sessions. | |
Private Attributes | |
| $enabled | |
| session is enabled | |
| $id_area | |
| area id | |
| $svprefix | |
| session var prefix | |
Registration/unregistration of session vars. Names are prefixed by SVPREFIX config value.
Storage and retrieval of session var values.
Tracking of session ids and associated IPs in the table sessions in order to avoid session fixation and session hijacking.
Sessions only work with cookies enabled by the user.
List of all session variables:
gcdone : (boolean) garbage collection in $log object already done language: current language ISO code
Definition at line 49 of file session.php.
| Session::__construct | ( | ) |
Constructor.
Do garbage collection for old ("expired") sessions in table sessions.
Check current session's consistency.
If not the originating IP, create a new session.
Definition at line 63 of file session.php.
References $cfg, and registerSession().
| Session::registerSession | ( | ) | [private] |
Register session in table sessions.
Definition at line 106 of file session.php.
Referenced by __construct().
| Session::setUseridInSession | ( | $ | uid | ) |
Set the user id in the corresponding session record.
| uid | user id |
Definition at line 116 of file session.php.
| Session::setValue | ( | $ | varname, | |
| $ | value | |||
| ) |
Assign a value to a session var.
| varname | session var name (not including the constant prefix) | |
| value | value to assign |
Definition at line 128 of file session.php.
| Session::getValue | ( | $ | varname | ) |
Get the value of a session var.
| varname | session var name (not including the constant prefix) |
Definition at line 140 of file session.php.
| Session::destroy | ( | ) |
Destroy current session.
Delete session record from table sessions.
Definition at line 151 of file session.php.
Session::$enabled [private] |
Session::$id_area [private] |
Session::$svprefix [private] |
1.5.3