groups_get_invites_for_user( int $user_id, int|bool $limit = false, int|bool $page = false, string|array|bool $exclude = false )

Get IDs of users with outstanding invites to a given group from a specified user.

Description

Parameters

$user_id

(Required) ID of the invited user.

$limit

(Optional) Limit to restrict to.

Default value: false

$page

(Optional) Page offset of results to return.

Default value: false

$exclude

(Optional) Array of comma-separated list of group IDs to exclude from results.

Default value: false

Return

(array)

  • 'groups'
    (array) Array of groups returned by paginated query.
  • 'total'
    (int) Count of groups matching query.

Source

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

function groups_get_invites_for_user( $user_id = 0, $limit = false, $page = false, $exclude = false ) {

	if ( empty( $user_id ) )
		$user_id = bp_loggedin_user_id();

	return BP_Groups_Member::get_invites( $user_id, $limit, $page, $exclude );
}

Changelog

Changelog
Version Description
BuddyPress 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.