WP_Session_Tokens::destroy_others( string $token_to_keep )

Destroy all session tokens for this user, except a single token, presumably the one in use.


Parameters

$token_to_keep

(Required) Session token to keep.


Source

File: wp-includes/class-wp-session-tokens.php

	final public function destroy_others( $token_to_keep ) {
		$verifier = $this->hash_token( $token_to_keep );
		$session = $this->get_session( $verifier );
		if ( $session ) {
			$this->destroy_other_sessions( $verifier );
		} else {
			$this->destroy_all_sessions();
		}
	}


Changelog

Changelog
Version Description
WP-4.0.0 Introduced.