wp_destroy_all_sessions() WP 4.0.0
Remove all session tokens for the current user from the database.
No Hooks.
Return
Null. Nothing.
Usage
wp_destroy_all_sessions();
Changelog
Since 4.0.0 | Introduced. |
Code of wp_destroy_all_sessions() wp destroy all sessions WP 5.6
function wp_destroy_all_sessions() {
$manager = WP_Session_Tokens::get_instance( get_current_user_id() );
$manager->destroy_all();
}