mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01: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. 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:
parent
4ca89cecbd
commit
634242343c
@ -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.
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user