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

3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
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.