Include ID in get_users_of_blog() results. Props jeremyclarke and filosofo. fixes #9020
git-svn-id: http://svn.automattic.com/wordpress/trunk@10595 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ff2e6c8f34
commit
2869882861
|
@ -278,7 +278,7 @@ function get_users_of_blog( $id = '' ) {
|
|||
global $wpdb, $blog_id;
|
||||
if ( empty($id) )
|
||||
$id = (int) $blog_id;
|
||||
$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" );
|
||||
$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" );
|
||||
return $users;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue