groups_get_membership_requested_group_ids( int $user_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_group_ids( $user_id = 0 ) {
if ( ! $user_id ) {
$user_id = bp_loggedin_user_id();
}
$group_ids = groups_get_requests( array(
'user_id' => $user_id,
'fields' => 'item_ids'
) );
return $group_ids;
}
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.