Make WordPress Core

Opened 9 hours ago

Closed 9 hours 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: Awaiting Review 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 (1)

#1 @kkmuffme
9 hours ago

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

Duplicate of #62393.

Note: See TracTickets for help on using tickets.