Make WordPress Core

Opened 2 months ago

Closed 2 months ago

Last modified 6 weeks ago

#62858 closed enhancement (duplicate)

doing_it_wrong when trying to set up user too early

Reported by: kkmuffme's profile kkmuffme Owned by: swissspidy's profile swissspidy
Milestone: Priority: normal
Severity: normal Version:
Component: Users Keywords:
Focuses: Cc:

Description

As seen in https://core.trac.wordpress.org/ticket/59000 and similar to the load translations early error https://core.trac.wordpress.org/changeset/59127 lots of plugins try to load the user too early.

It's supposed to happen right before init https://github.com/WordPress/wordpress-develop/blob/771ef176d770dce40491d39007262d308d08585d/src/wp-settings.php#L690-L691 or right after setup_theme if in the admin https://github.com/WordPress/wordpress-develop/blob/771ef176d770dce40491d39007262d308d08585d/src/wp-settings.php#L640-L641

Suggestion: use a doing it wrong error, if the user is being set before that in the same way it was done for loading translations early

Change History (2)

#1 @kkmuffme
2 months ago

  • Resolution set to duplicate
  • Status changed from assigned to closed

Duplicate of #62393.

#2 @desrosj
6 weeks ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.