[wp-trac] [WordPress Trac] #49533: Add user ID to wp_logout action
WordPress Trac
noreply at wordpress.org
Thu Feb 27 20:01:40 UTC 2020
#49533: Add user ID to wp_logout action
-------------------------------+----------------------------------------
Reporter: TimothyBlynJacobs | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 5.3
Severity: normal | Keywords: needs-patch good-first-bug
Focuses: |
-------------------------------+----------------------------------------
As [https://core.trac.wordpress.org/ticket/35488#comment:11 pointed out]
by @figureone, after #35488, the logged out user's id is no longer
accessible when the `wp_logout` action is fired.
I think it would be a good idea to get the current user's id before
starting the logout and then passing that id to the logout filter. As
@figureone pointed out, the `clear_auth_cookie` hook can be used as a
stop-gap, but I think the change is still valuable since the two aren't
equivalent actions. Auth cookies are cleared in other places, not just
when the user is logging out.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/49533>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list