session_support
class session_support
| internal |
Session support wrapper for Moodle's session management.
Methods
static bool
confirm_sesskey(string|null $sesskey = null)
Confirms that the current sesskey is valid.
static void
require_sesskey()
Ensures that the current sesskey is valid.
static string
sesskey()
Retrieves the current sesskey.
static void
destroy_user_sessions(int $userid, string $except = '')
Destroys all active sessions for a specific user.
static string|null
get_wants_url()
Retrieves the URL the user was trying to access before login.
static void
unset_wants_url()
Removes the wantsurl from the session.
static string
get_id()
Retrieves the current PHP session ID.
Details
at line 38
static bool
confirm_sesskey(string|null $sesskey = null)
Confirms that the current sesskey is valid.
at line 48
static void
require_sesskey()
Ensures that the current sesskey is valid.
at line 58
static string
sesskey()
Retrieves the current sesskey.
at line 69
static void
destroy_user_sessions(int $userid, string $except = '')
Destroys all active sessions for a specific user.
at line 79
static void
set_user(stdClass $user)
Sets the current user in the session.
at line 89
static string|null
get_wants_url()
Retrieves the URL the user was trying to access before login.
at line 99
static void
unset_wants_url()
Removes the wantsurl from the session.
at line 110
static string
get_id()
Retrieves the current PHP session ID.