groups_check_user_has_invite( int $user_id, int $group_id, string $type = 'sent' )
Check to see whether a user has already been invited to a group.
Description Description
By default, the function checks for invitations that have been sent. Entering ‘all’ as the $type parameter will return unsent invitations as well (useful to make sure AJAX requests are not duplicated).
Parameters Parameters
- $user_id
-
(Required) ID of potential group member.
- $group_id
-
(Required) ID of potential group.
- $type
-
(Optional) Use 'sent' to check for sent invites, 'all' to check for all. Default: 'sent'.
Default value: 'sent'
Return Return
(int|bool) ID of the first found membership if found, otherwise false.
Source Source
File: bp-groups/bp-groups-functions.php
function groups_check_user_has_invite( $user_id, $group_id, $type = 'sent' ) { return groups_check_has_invite_from_user( $user_id, $group_id, false, $type ); }
Changelog Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |