Opened 3 weeks ago
Last modified 9 days ago
#62393 assigned enhancement
doing it wrong for user used too early
Reported by: | kkmuffme | Owned by: | swissspidy |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | minor | Version: | |
Component: | Users | Keywords: | |
Focuses: | Cc: |
Description
Inspired by https://core.trac.wordpress.org/ticket/44937 specifically https://core.trac.wordpress.org/ticket/44937#comment:33
That means it causes the current user to be set up too early.
I guess we should add the same doing it wrong that was added for translations when someone tries to load the user early in other cases too?
Essentially where we now have in function _wp_get_current_user() {
<?php $user_id = apply_filters( 'determine_current_user', false );
What do you think?
Change History (3)
Note: See
TracTickets for help on using
tickets.
If we want to report all of them, it would have to be at the beginning of
_wp_get_current_user()
since that filter above would only run once for most requests