wp_destroy_all_sessions()WP 4.0.0

Removes all session tokens for the current user from the database.

No Hooks.

Return

null. Nothing (null).

Usage

wp_destroy_all_sessions();

Changelog

Since 4.0.0 Introduced.

wp_destroy_all_sessions() code WP 6.5.2

function wp_destroy_all_sessions() {
	$manager = WP_Session_Tokens::get_instance( get_current_user_id() );
	$manager->destroy_all();
}