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.
Built from https://develop.svn.wordpress.org/trunk@46467


git-svn-id: http://core.svn.wordpress.org/trunk@46265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2019-10-12 03:10:03 +00:00
parent 4ca89cecbd
commit 634242343c
2 changed files with 2 additions and 1 deletions

View File

@ -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.

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-beta3-46466';
$wp_version = '5.3-beta3-46467';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.