Retrieves a list of sessions for the current user.
Source
function wp_get_all_sessions() {
$manager = WP_Session_Tokens::get_instance( get_current_user_id() );
return $manager->get_all();
}
Changelog
Version | Description |
---|---|
4.0.0 | Introduced. |
CARVIEW |
Retrieves a list of sessions for the current user.
function wp_get_all_sessions() {
$manager = WP_Session_Tokens::get_instance( get_current_user_id() );
return $manager->get_all();
}
Uses | Description |
---|---|
WP_Session_Tokens::get_instance()wp-includes/class-wp-session-tokens.php | Retrieves a session manager instance for a user. |
get_current_user_id()wp-includes/user.php | Gets the current user’s ID. |
Version | Description |
---|---|
4.0.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.