[wp-trac] [WordPress Trac] #31878: get_users() on multisite returns empty user roles when other blog_id provided

WordPress Trac noreply at wordpress.org
Fri Apr 3 11:58:47 UTC 2015


#31878: get_users() on multisite returns empty user roles when other blog_id
provided
--------------------------+-----------------------------
 Reporter:  Kubitomakita  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Users         |    Version:  4.1.1
 Severity:  normal        |   Keywords:
  Focuses:  multisite     |
--------------------------+-----------------------------
 For example if you'll query:

 {{{
 get_users( array( 'blog_id' => 2 ) );
 }}}

 This will return:

 {{{
 [0] => WP_User Object
         (
             [data] => stdClass Object
                 (
                     [ID] => XX
                     [user_login] => XXX
                     [user_pass] => XXX
                     [user_nicename] => XXX
                     [user_email] => XXX
                     [user_url] =>
                     [user_registered] => XXX
                     [user_activation_key] =>
                     [user_status] => 0
                     [display_name] => XXX
                     [spam] => 0
                     [deleted] => 0
                 )

             [ID] => XX
             [caps] => Array
                 (
                 )

             [cap_key] => wp_capabilities
             [roles] => Array
                 (
                 )

             [allcaps] => Array
                 (
                 )

             [filter] =>
         )
 }}}

 Even if user got role specified for the blog with ID 2.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31878>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list