get_users_of_blog

Definition:
function get_users_of_blog( $id = '' ) {}

Get users for the blog.
For setups that use the multi-blog feature. Can be used outside of the multi-blog feature.

Parameters

  • int $id: Blog ID.

Return values

returns:List of users that are part of that Blog ID

Source code

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" );

9762

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: