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.

Top ↑

Parameters Parameters


(int) (Required) ID of the user.


(int) (Required) ID of the group.

Top ↑

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 );

Top ↑

Changelog Changelog

Version Description
1.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.