BP_Groups_Member::get_all_membership_request_user_ids( int $group_id )

Get the IDs users with outstanding membership requests to the group.

Description

Parameters

$group_id

(Required) ID of the group.

Return

(array) IDs of users with outstanding membership requests.

Source

File: bp-groups/classes/class-bp-groups-member.php

	public static function get_all_membership_request_user_ids( $group_id ) {
		global $wpdb;

		$bp = buddypress();

		return array_map( 'intval', $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM {$bp->groups->table_name_members} WHERE group_id = %d AND is_confirmed = 0 AND inviter_id = 0", $group_id ) ) );
	}

Changelog

Changelog
Version Description
BuddyPress 1.6.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.