mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-02 11:44:33 +00:00
Users: Make sure wp_logout() clears current user, so that a subsequent call to is_user_logged_in() works as expected.
Props sebastian.pisula, donmhico, roytanck, juliobox. Fixes #35488. git-svn-id: https://develop.svn.wordpress.org/trunk@46467 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -571,6 +571,7 @@ if ( ! function_exists( 'wp_logout' ) ) :
|
||||
function wp_logout() {
|
||||
wp_destroy_current_session();
|
||||
wp_clear_auth_cookie();
|
||||
wp_set_current_user( 0 );
|
||||
|
||||
/**
|
||||
* Fires after a user is logged-out.
|
||||
|
||||
Reference in New Issue
Block a user