friends_count_invitable_friends( int $user_id, int $group_id )

Get a count of a user’s friends who can be invited to a given group.

Description Description

Users can invite any of their friends except:

  • users who are already in the group
  • users who have a pending invite to the group
  • users who have been banned from the group

Top ↑

Parameters Parameters


(int) (Required) ID of the user whose friends are being counted.


(int) (Required) ID of the group friends are being invited to.

Top ↑

Return Return

(int) $invitable_count Eligible friend count.

Source Source

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

function friends_count_invitable_friends( $user_id, $group_id ) {
	return BP_Friends_Friendship::get_invitable_friend_count( $user_id, $group_id );

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.