bp_member_type_by_type( $type_id )

Gets member by type id.

Description

Parameters

$type_id

(Required)

Return

(array)

Source

File: bp-members/bp-members-functions.php

function bp_member_type_by_type( $type_id ) {
	global $wpdb;

	$member_ids = array();

	if ( empty ( $type_id ) ) {
		return $member_ids;
	}

	$member_ids = $wpdb->get_col( "SELECT u.ID FROM {$wpdb->users} u INNER JOIN {$wpdb->prefix}term_relationships r ON u.ID = r.object_id WHERE u.user_status = 0 AND r.term_taxonomy_id = " . $type_id );

	return $member_ids;
}

Changelog

Changelog
Version Description
BuddyBoss 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.