mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
Revert get_users_of_blog() to 3.0 behavior and deprecate. Use get_users() in core. Props scribu. fixes #15854
git-svn-id: https://develop.svn.wordpress.org/trunk@17084 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -2415,6 +2415,31 @@ function update_usermeta( $user_id, $meta_key, $meta_value ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get users for the blog.
|
||||
*
|
||||
* For setups that use the multi-blog feature. Can be used outside of the
|
||||
* multi-blog feature.
|
||||
*
|
||||
* @since 2.2.0
|
||||
* @deprecated 3.1.0
|
||||
* @uses $wpdb WordPress database object for queries
|
||||
* @uses $blog_id The Blog id of the blog for those that use more than one blog
|
||||
*
|
||||
* @param int $id Blog ID.
|
||||
* @return array List of users that are part of that Blog ID
|
||||
*/
|
||||
function get_users_of_blog( $id = '' ) {
|
||||
_deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
|
||||
|
||||
global $wpdb, $blog_id;
|
||||
if ( empty($id) )
|
||||
$id = (int) $blog_id;
|
||||
$blog_prefix = $wpdb->get_blog_prefix($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 = '{$blog_prefix}capabilities' ORDER BY {$wpdb->usermeta}.user_id" );
|
||||
return $users;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable/disable automatic general feed link outputting.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user