PHP:
- function get_users_with_role ($role) {
- // gets all users with specified role
- $wp_user_search = new WP_User_Search( '', '', $role);
- return $wp_user_search->get_results();
- }
As John notes, remember this is for use in the admin panels. Thanks, John.