mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
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:
parent
11ff3a7ce9
commit
1652fe96c1
@ -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 ) )
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
10
xmlrpc.php
10
xmlrpc.php
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user