[wp-trac] [WordPress Trac] #38851: WP_User_Query cannot retrieve multisite users who have not been assigned a role on a site

WordPress Trac noreply at wordpress.org
Fri Dec 1 05:20:32 UTC 2017


#38851: WP_User_Query cannot retrieve multisite users who have not been assigned a
role on a site
------------------------------------------+-----------------------------
 Reporter:  robdxw                        |       Owner:
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  Future Release
Component:  Users                         |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  needs-patch needs-unit-tests  |     Focuses:
------------------------------------------+-----------------------------

Comment (by demsei):

 Good catch @robdxw! I am interested in a fix for this as well. For now I
 am using the solution @tomdxw posted:
 {{{#!php
 <?php
 $args = array(
   'blog_id' => 0,
   'meta_query' => array(
     array(
       'key' => 'my.special.key',
       'compare' => 'NOT EXISTS'
     )
   )
 );
 }}}

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


More information about the wp-trac mailing list