wp_get_all_sessions()
Retrieves a list of sessions for the current user.
No Hooks.
Return
Array
. Array of sessions.
Usage
wp_get_all_sessions();
Changelog
Since 4.0.0 | Introduced. |
wp_get_all_sessions() wp get all sessions code WP 6.7.1
function wp_get_all_sessions() { $manager = WP_Session_Tokens::get_instance( get_current_user_id() ); return $manager->get_all(); }