WordPress at a glance
function is not described

get_users_of_blog() WP 2.2.0

Deprecated in 3.1.0. It is no longer supported and can be removed in future releases. Use get_users() instead.

Get users for the site.

For setups that use the multisite feature. Can be used outside of the multisite feature.

No Hooks.

Return

Array. List of users that are part of that site ID

Usage

get_users_of_blog( $id );
$id(int)
Site ID.
Default: ''

Notes

  • See: get_users()
  • Global. wpdb. $wpdb WordPress database abstraction object.

Changelog

Since DEL 3.1.0 Introduced.

Code of get users of blog: wp-includes/deprecated.php WP 5.2.2

<?php
function get_users_of_blog( $id = '' ) {
	_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );

	global $wpdb;
	if ( empty( $id ) ) {
		$id = get_current_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;
}