Make WordPress Core


Ignore:
Timestamp:
12/20/2010 04:25:35 PM (14 years ago)
Author:
ryan
Message:

Revert get_users_of_blog() to 3.0 behavior and deprecate. Use get_users() in core. Props scribu. fixes #15854

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/deprecated.php

    r17009 r17084  
    24172417
    24182418/**
     2419 * Get users for the blog.
     2420 *
     2421 * For setups that use the multi-blog feature. Can be used outside of the
     2422 * multi-blog feature.
     2423 *
     2424 * @since 2.2.0
     2425 * @deprecated 3.1.0
     2426 * @uses $wpdb WordPress database object for queries
     2427 * @uses $blog_id The Blog id of the blog for those that use more than one blog
     2428 *
     2429 * @param int $id Blog ID.
     2430 * @return array List of users that are part of that Blog ID
     2431 */
     2432function get_users_of_blog( $id = '' ) {
     2433    _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
     2434
     2435    global $wpdb, $blog_id;
     2436    if ( empty($id) )
     2437        $id = (int) $blog_id;
     2438    $blog_prefix = $wpdb->get_blog_prefix($id);
     2439    $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 = '{$blog_prefix}capabilities' ORDER BY {$wpdb->usermeta}.user_id" );
     2440    return $users;
     2441}
     2442
     2443/**
    24192444 * Enable/disable automatic general feed link outputting.
    24202445 *
Note: See TracChangeset for help on using the changeset viewer.