WordPress.org

Make WordPress Core

Ticket #9020: get_users_of_blog_with_ID.9020.diff

File get_users_of_blog_with_ID.9020.diff, 860 bytes (added by filosofo, 5 years ago)
  • wp-includes/user.php

     
    278278        global $wpdb, $blog_id; 
    279279        if ( empty($id) ) 
    280280                $id = (int) $blog_id; 
    281         $users = $wpdb->get_results( "SELECT user_id, user_login, display_name, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE " . $wpdb->users . ".ID = " . $wpdb->usermeta . ".user_id AND meta_key = '" . $wpdb->prefix . "capabilities' ORDER BY {$wpdb->usermeta}.user_id" ); 
     281        $users = $wpdb->get_results( "SELECT user_id, user_id AS ID, user_login, display_name, user_email, meta_value FROM $wpdb->users, $wpdb->usermeta WHERE {$wpdb->users}.ID = {$wpdb->usermeta}.user_id AND meta_key = '{$wpdb->prefix}capabilities' ORDER BY {$wpdb->usermeta}.user_id" ); 
    282282        return $users; 
    283283} 
    284284