[wp-trac] [WordPress Trac] #44169: New filter to short circuit WP_User_Query results

WordPress Trac noreply at wordpress.org
Tue May 22 09:27:43 UTC 2018


#44169: New filter to short circuit WP_User_Query results
----------------------------------------+------------------------------
 Reporter:  tlovett1                    |       Owner:  (none)
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Users                       |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+------------------------------
Changes (by birgire):

 * keywords:  has-patch => has-patch needs-unit-tests


Comment:

 @tlovett1 Thanks for the patch.

 It passes the current unit tests for the ''user'' group.

 I will mark that this will need ''unit tests'', if this goes forward.

 Regarding the use cases, I can imagine this would be mostly used to
 override the search query of {{{WP_User_Query}}}, both front and backend?

 I wonder if this could affect other processes?  I don't think
 {{{WP_User_Query}}} is used during the login progress, but one could e.g.
 test what happens if {{{WP_User_Query}}} returns no users at all, during
 login.

 ps: It seems that {{{posts_pre_query}}} was introduced to {{{WP_Query}}}
 ticket #36687.

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


More information about the wp-trac mailing list