groups_is_user_invited( int $user_id, int $group_id, string $type = 'sent' )

Check whether a user has an outstanding invitation to a group.

Parameters Parameters


(int) (Required) ID of the user.


(int) (Required) ID of the group.


(string) (Optional) If 'sent', results are limited to those invitations that have actually been sent (non-draft). Possible values: 'sent', 'draft', or 'all' Default: 'sent'.

Default value: 'sent'

Top ↑

Return Return

(int|bool) ID of the membership if the user is invited, otherwise false.

Source Source

File: bp-groups/bp-groups-functions.php

function groups_is_user_invited( $user_id, $group_id, $type = 'sent' ) {
	return groups_check_has_invite_from_user( $user_id, $group_id, false, $type );

Top ↑

Changelog Changelog

Version Description
5.0.0 Added $type parameter.
2.6.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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