groups_get_invited_to_group_ids( int $user_id )

Get an array of group IDs to which a user is invited.


Parameters Parameters

$user_id

(int) (Required) The user ID.


Top ↑

Return Return

(array) Array of group IDs.


Source Source

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

 function groups_get_invited_to_group_ids( $user_id = 0 ) {
	if ( empty( $user_id ) ) {
		$user_id = bp_loggedin_user_id();
	}

	$group_ids = groups_get_invites( array(
		'user_id'     => $user_id,
		'invite_sent' => 'sent',
		'fields'      => 'item_ids'
	) );

	return array_unique( $group_ids );
}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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