WP_Session_Tokens
class WP_Session_Tokens
// Constructor: function Object() { [native code] } Abstract class for managing user session tokens.
Methods 19 methods
| Method / Return | Description |
|---|---|
| __construct() void | Protected constructor. Use the `get_instance()` method to get the instance.
Parameters: $user_id: mixed |
| get_instance() WP_Session_Tokens | Retrieves a session manager instance for a user.
Parameters: $user_id: mixed |
| hash_token() string | Hashes the given session token for storage.
Parameters: $token: mixed |
| get() (array | Retrieves a user's session for the given token.
Parameters: $token: mixed |
| verify() bool | Validates the given session token for authenticity and validity.
Parameters: $token: mixed |
| create() string | Generates a session token and attaches session information to it.
Parameters: $expiration: mixed |
| update() void | Updates the data for the session with the given token.
Parameters: $token: mixed, $session: mixed |
| destroy() void | Destroys the session with the given token.
Parameters: $token: mixed |
| destroy_others() void | Destroys all sessions for this user except the one with the given token (presumably the one in use).
Parameters: $token_to_keep: mixed |
| is_still_valid() bool | Determines whether a session is still valid, based on its expiration timestamp.
Parameters: $session: mixed |
| destroy_all() void | Destroys all sessions for a user. |
| destroy_all_for_all_users() void | Destroys all sessions for all users. |
| get_all() array | Retrieves all sessions for a user. |
| get_sessions() array | Retrieves all sessions of the user. |
| get_session() (array | Retrieves a session based on its verifier (token hash).
Parameters: $verifier: mixed |
| update_session() void | Updates a session based on its verifier (token hash).
Parameters: $verifier: mixed, $session: mixed |
| destroy_other_sessions() void | Destroys all sessions for this user, except the single session with the given verifier.
Parameters: $verifier: mixed |
| destroy_all_sessions() void | Destroys all sessions for the user. |
| drop_sessions() void | Destroys all sessions for all users. |
Properties
| Property / Type | Description |
|---|---|
| $user_id mixed public | No description available. |