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
-
(Required) The user ID.
Return
(array) Array of group IDs.
Source
File: bp-groups/bp-groups-functions.php
1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 | 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.