Make WordPress Core

Changeset 17011


Ignore:
Timestamp:
12/16/2010 11:43:24 PM (14 years ago)
Author:
scribu
Message:

Get only required fields in wp_getAuthors(). Props duck_. See #15854

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-xmlrpc-server.php

    r16999 r17011  
    781781
    782782        $authors = array();
    783         foreach ( get_users() as $user_id => $user_object ) {
     783        foreach ( get_users( array( 'fields' => array('ID','user_login','display_name') ) ) as $user ) {
    784784            $authors[] = array(
    785                 "user_id"       => $user_id,
    786                 "user_login"    => $user_object->user_login,
    787                 "display_name"  => $user_object->display_name
     785                "user_id"       => $user->ID,
     786                "user_login"    => $user->user_login,
     787                "display_name"  => $user->display_name
    788788            );
    789789        }
Note: See TracChangeset for help on using the changeset viewer.