From 81f23003e31bbfbc43dc572271f81957c09c3ecf Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 21 Oct 2010 13:08:47 +0000 Subject: [PATCH] Use get_users() instead of get_users_of_blog(). Props scribu. see #15053 git-svn-id: http://svn.automattic.com/wordpress/trunk@15882 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/default-list-tables.php | 2 +- wp-admin/network/sites.php | 2 +- wp-includes/user.php | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/default-list-tables.php b/wp-admin/includes/default-list-tables.php index 0b9cfd9e39..3ec22a29fd 100644 --- a/wp-admin/includes/default-list-tables.php +++ b/wp-admin/includes/default-list-tables.php @@ -2958,7 +2958,7 @@ class WP_Sites_Table extends WP_List_Table { case 'users': ?> 6) ); + $blogusers = get_users( array( 'blog_id' => $blog['blog_id'], 'number' => 6) ); if ( is_array( $blogusers ) ) { $blogusers_warning = ''; if ( count( $blogusers ) > 5 ) { diff --git a/wp-admin/network/sites.php b/wp-admin/network/sites.php index c2c9d34e01..60babebcd7 100644 --- a/wp-admin/network/sites.php +++ b/wp-admin/network/sites.php @@ -257,7 +257,7 @@ switch ( $action ) { 20) ); + $blogusers = get_users( array( 'blog_id' => $id, 'number' => 20 ) ); if ( is_array( $blogusers ) ) { echo '

' . __( 'Site Users' ) . '

'; echo ''; diff --git a/wp-includes/user.php b/wp-includes/user.php index 4690b06c6c..adfcff0e94 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -563,7 +563,6 @@ function get_users( $args = array() ) { * @uses $blog_id The Blog id of the blog for those that use more than one blog * * @param int $id Blog ID. - * @param array $args Optional query arguments passed to get_users() * @return array List of users that are part of that Blog ID */ function get_users_of_blog( $id = '', $args = array() ) { @@ -572,8 +571,7 @@ function get_users_of_blog( $id = '', $args = array() ) { if ( empty($id) ) $id = (int) $blog_id; - $args['blog_id'] = $id; - return get_users( $args ); + return get_users( array( 'blog_id' => $id ) ); } /**