How do I list multisite users for the current site only

I’m looking for a way of selecting the users for one site within a multisite set up. Can anyone tell me how to do this please?

This is what I have at the moment:

Read More
$user_search = $wpdb->get_results("SELECT ID, display_name, user_email FROM ".$wpdb->base_prefix."users");

but this selects all users across the multisite.

Many thanks!

Related posts

Leave a Reply

1 comment