wp_destroy_all_sessions()
Removes all session tokens for the current user from the database.
No Hooks.
Returns
null. Nothing (null).
Usage
wp_destroy_all_sessions();
Changelog
| Since 4.0.0 | Introduced. |
wp_destroy_all_sessions() wp destroy all sessions code WP 6.9.1
function wp_destroy_all_sessions() {
$manager = WP_Session_Tokens::get_instance( get_current_user_id() );
$manager->destroy_all();
}