groups_get_membership_requested_user_ids( $group_id )

Get an array of group IDs to which a user has requested membership.

Description

Parameters

$user_id

(Required) The user ID.

Return

(array) Array of group IDs.

Source

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

function groups_get_membership_requested_user_ids( $group_id = 0 ) {
	if ( ! $group_id ) {
		$group_id = bp_get_current_group_id();
	}

	$requests = groups_get_requests( array(
		'item_id' => $group_id,
		'fields'  => 'user_ids'
	) );

	return $requests;
}

Changelog

Changelog
Version Description
BuddyPress 5.0.0 BuddyPress 5.0.0
BuddyBoss 1.3.5 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.