groups_get_invited_to_group_ids( int $user_id )
Get an array of group IDs to which a user is invited.
Description
Parameters
- $user_id
-
(int) (Required) The user ID.
Return
(array) Array of group IDs.
Source
File: bp-groups/bp-groups-functions.php
function groups_get_invited_to_group_ids( $user_id = 0 ) { if ( empty( $user_id ) ) { $user_id = bp_loggedin_user_id(); } $group_ids = groups_get_invites( array( 'user_id' => $user_id, 'invite_sent' => 'sent', 'fields' => 'item_ids' ) ); return array_unique( $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.