WordPress at Your Fingertips
function is not described

WP_User_Meta_Session_Tokens::destroy_other_sessions() protected WP 4.0.0

Destroys all sessions for this user, except the single session with the given verifier.

{} It's a method of the class: WP_User_Meta_Session_Tokens{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->destroy_other_sessions( $verifier );
$verifier(string) (required)
Verifier of the session to keep.

Changelog

Since 4.0.0 Introduced.

Code of WP_User_Meta_Session_Tokens::destroy_other_sessions() WP 5.8.2

protected function destroy_other_sessions( $verifier ) {
	$session = $this->get_session( $verifier );
	$this->update_sessions( array( $verifier => $session ) );
}