fix wp_getAuthors in xmlrpc.php. See #14572 and [15566]

git-svn-id: http://svn.automattic.com/wordpress/trunk@15567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
scribu 2010-09-05 14:49:52 +00:00
parent 11ff3a7ce9
commit 1652fe96c1
4 changed files with 8 additions and 8 deletions

View File

@ -667,7 +667,7 @@ function populate_network( $network_id = 1, $domain = '', $email = '', $site_nam
if ( !is_multisite() ) {
$site_admins = array( $site_user->user_login );
$users = get_users_of_blog();
$users = get_users();
if ( $users ) {
foreach ( $users as $user ) {
if ( is_super_admin( $user->ID ) && !in_array( $user->user_login, $site_admins ) )

View File

@ -281,7 +281,7 @@ function wp_list_authors($args = '') {
$return = '';
/** @todo Move select to get_authors(). */
$users = get_users_of_blog();
$users = get_users();
$author_ids = array();
foreach ( (array) $users as $user )
$author_ids[] = $user->user_id;

View File

@ -572,7 +572,7 @@ function get_users( $args ) {
* @return array List of users that are part of that Blog ID
*/
function get_users_of_blog( $id = '' ) {
global $wpdb, $blog_id;
global $blog_id;
if ( empty($id) )
$id = (int) $blog_id;

View File

@ -834,15 +834,15 @@ class wp_xmlrpc_server extends IXR_Server {
do_action('xmlrpc_call', 'wp.getAuthors');
$authors = array();
foreach ( (array) get_users_of_blog() as $row ) {
foreach ( get_users() as $user_id => $user_object ) {
$authors[] = array(
"user_id" => $row->user_id,
"user_login" => $row->user_login,
"display_name" => $row->display_name
"user_id" => $user_id,
"user_login" => $user_object->user_login,
"display_name" => $user_object->display_name
);
}
return($authors);
return $authors;
}
/**