WordPress at a glance
function is not described

WP_User_Meta_Session_Tokens::get_sessions() WP 4.0.0

Retrieves all sessions of the user.

This is a method of the class: WP_User_Meta_Session_Tokens

No Hooks.

Return

Array. Sessions of the user.

Usage

$WP_User_Meta_Session_Tokens = new WP_User_Meta_Session_Tokens();
$var = $WP_User_Meta_Session_Tokens->get_sessions();

Changelog

Since 4.0.0 Introduced.

Code of WP User Meta Session Tokens::get sessions: wp-includes/class-wp-user-meta-session-tokens.php WP 5.2.2

<?php
protected function get_sessions() {
	$sessions = get_user_meta( $this->user_id, 'session_tokens', true );

	if ( ! is_array( $sessions ) ) {
		return array();
	}

	$sessions = array_map( array( $this, 'prepare_session' ), $sessions );
	return array_filter( $sessions, array( $this, 'is_still_valid' ) );
}