Make WordPress Core

Opened 5 months ago

Closed 5 months ago

Last modified 3 months ago

#62393 closed enhancement (duplicate)

doing it wrong for user used too early

Reported by: kkmuffme's profile kkmuffme Owned by: swissspidy's profile swissspidy
Milestone: 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 (5)

#1 @kkmuffme
5 months ago

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

#2 @desrosj
5 months ago

  • Owner changed from swisssspidy to swissspidy

#3 @swissspidy
5 months ago

This sounds like a duplicate of #43869 to me.

#4 @swissspidy
5 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

Duplicate of #43869.

#5 @kkmuffme
3 months ago

#62858 was marked as a duplicate.

Note: See TracTickets for help on using tickets.