public function list_( $args, $assoc_args ) {
		$user      = $this->fetcher->get_check( $args[0] );
		$formatter = $this->get_formatter( $assoc_args );
		$manager   = WP_Session_Tokens::get_instance( $user->ID );
		$sessions  = $this->get_all_sessions( $manager );

		if ( 'ids' === $formatter->format ) {
			echo implode( ' ', array_keys( $sessions ) );
		} else {
			$formatter->display_items( $sessions );
		}
	}
public function list_( $args, $assoc_args ) {
		$user      = $this->fetcher->get_check( $args[0] );
		$formatter = $this->get_formatter( $assoc_args );
		$manager   = WP_Session_Tokens::get_instance( $user->ID );
		$sessions  = $this->get_all_sessions( $manager );

		if ( 'ids' === $formatter->format ) {
			echo implode( ' ', array_keys( $sessions ) );
		} else {
			$formatter->display_items( $sessions );
		}
	}
public function list_ ( $ args , $ assoc_args ) { $ user = $ this -> fetcher -> get_check ( $ args [ 0 ] ) ; $ formatter = $ this -> get_formatter ( $ assoc_args ) ; $ manager = WP_Session_Tokens :: get_instance ( $ user -> ID ) ; $ sessions = $ this -> get_all_sessions ( $ manager ) ; if ( 'ids' === $ formatter -> format ) { echo implode ( ' ' , array_keys ( $ sessions ) ) ; } else { $ formatter -> display_items ( $ sessions ) ; } }
List sessions for the given user.

Note: The `token` field does not return the actual token, but a hash of
it. The real token is not persisted and can only be found in the
corresponding cookies on the client side.

## OPTIONS

<user>
: User ID, user email, or user login.

[--fields=<fields>]
: Limit the output to specific fields.

[--format=<format>]
: Render output in a particular format.
---
default: table
options:
- table
- csv
- json
- yaml
- count
- ids
---

## AVAILABLE FIELDS

These fields will be displayed by default for each session:

* token
* login_time
* expiration_time
* ip
* ua

These fields are optionally available:

* expiration
* login

## EXAMPLES

# List a user's sessions.
$ wp user session list admin@example.com --format=csv
login_time,expiration_time,ip,ua
"2016-01-01 12:34:56","2016-02-01 12:34:56",127.0.0.1,"Mozilla/5.0..."

@subcommand list
List sessions for the given user .