-
Notifications
You must be signed in to change notification settings - Fork 799
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Masterbar: send wpcom user ID to wpcom when attempting to log… (#13777)
* Masterbar: send wpcom user ID to wpcom when attempting to log out Fixes #13680 Until now, we would send a sync event to WordPress.com anytime someone attempted to log out from a site using the "Sign Out" button in the masterbar. From now on, we'll only do that when we have info about the connected WordPress.com user linked to that local user, and we'll send their wpcom user ID to WordPress.com so WordPress.com can disconnect them (and no one else) from WordPress.com. * Masterbar: hook into logout_redirect to handle post logout action WP 5.3 changed the way logouts worked: https://core.trac.wordpress.org/changeset/46467 As a result we cannot pull the user's ID as they are logging out via the `wp_logout` filter anymore, because by then their info has already been cleared. Let's instead hooked into `logout_redirect`, where we still have info about the user that logged out.
- Loading branch information
Showing
2 changed files
with
30 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters