[wp-trac] [WordPress Trac] #56952: cache_users() not defined when calling get_user without field parameter or using all_with_meta or all

WordPress Trac noreply at wordpress.org
Sat Nov 5 18:24:14 UTC 2022


#56952: cache_users() not defined when calling get_user without field parameter or
using all_with_meta or all
----------------------------------------+--------------------------------
 Reporter:  carazo                      |       Owner:  TimothyBlynJacobs
     Type:  defect (bug)                |      Status:  accepted
 Priority:  normal                      |   Milestone:  6.1.1
Component:  Users                       |     Version:  6.1
 Severity:  major                       |  Resolution:
 Keywords:  has-patch has-testing-info  |     Focuses:
----------------------------------------+--------------------------------

Comment (by TimothyBlynJacobs):

 @dd32, @SergeyBiryukov I’d love your opinions about implementing a doing
 it wrong notice here. I think plugins ideally wouldn’t be doing user
 queries before `plugins_loaded` even prior to the change in 6.1. For
 instance, plugins also wouldn’t get an opportunity to register necessary
 filters.

 However, I could see MU-Plugins needing to make early queries anyways. So
 as much as I think it’s “correct” for plugins to wait, I’m not sure we can
 get away with the notice here. It may just have to be a documentation
 note.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56952#comment:16>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list