groups_accept_invite( int $user_id, int $group_id )
Process the acceptance of a group invitation.
Description Description
Returns true if a user is already a member of the group.
Parameters Parameters
- $user_id
-
(Required) ID of the user.
- $group_id
-
(Required) ID of the group.
Return Return
(bool) True when the user is a member of the group, otherwise false.
Source Source
File: bp-groups/bp-groups-functions.php
function groups_accept_invite( $user_id, $group_id ) {
$invites_class = new BP_Groups_Invitation_Manager();
$args = array(
'user_id' => $user_id,
'item_id' => $group_id,
'invite_sent' => 'sent',
);
return $invites_class->accept_invitation( $args );
}
Changelog Changelog
| Version | Description |
|---|---|
| 1.0.0 | Introduced. |