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

Top ↑

Parameters Parameters


(int) (Required) ID of potential group member.


(int) (Required) ID of potential group.


(string) (Optional) Use 'sent' to check for sent invites, 'all' to check for all. Default: 'sent'.

Default value: 'sent'

Top ↑

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

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.