Updates session data in database.
Note: The key actually only needs to be updated on a logout.
void delete(
string
$param
)
|
|
Delete a value from the session data.
Parameters:
|
string |
$param: |
Name of the data's key. |
mixed get(
string
$param, [mixed
$default = NULL]
)
|
|
Get a data value for the session. This checks for the data to be expired and unsets it then.
Parameters:
|
string |
$param: |
Name of the data's key. |
|
mixed |
$default: |
Default value to use if key is not set or has expired. (since 1.10.0) |
API Tags:
| Return: | The value, if set; otherwise $default |
Check if session has a user attached.
Logout the user, by invalidating the session key and unsetting $user_ID.
We want to keep the user in the session log, but we're unsetting $user_ID, which refers to the current session.
Because the session key is invalid/broken, on the next request a new session will be started.
NOTE: we MIGHT want to link subsequent sessions together if we want to keep track...
Reload session data.
This is needed if the running process waits for a child process to write data into the Session, e.g. the captcha plugin in test mode waiting for the Debuglog output from the process that created the image (included through an IMG tag).
void set(
string
$param, mixed
$value, [integer
$expire = 0]
)
|
|
Set a data value for the session.
Parameters:
|
string |
$param: |
Name of the data's key. |
|
mixed |
$value: |
The value |
|
integer |
$expire: |
Time in seconds for data to expire (0 to disable). |
void set_User(
User
$User
)
|
|
Attach a User object to the session.
Parameters:
|
User |
$User: |
The user to attach |
void set_user_ID(
integer
$user_ID
)
|
|
Attach a user ID to the session.
NOTE: ID gets saved to DB on shutdown. This may be a "problem" when querying T_sessions for sess_user_ID.
Parameters:
|
integer |
$user_ID: |
The ID of the user to attach |