friends_get_friendship_id( int $initiator_user_id, int $friend_user_id )

Get the ID of two users’ friendship, if it exists.

Description

Parameters

$initiator_user_id

(int) (Required) ID of the first user.

$friend_user_id

(int) (Required) ID of the second user.

Return

(int|null) ID of the friendship if found, otherwise false.

Source

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

function friends_get_friendship_id( $initiator_user_id, $friend_user_id ) {
	return BP_Friends_Friendship::get_friendship_id( $initiator_user_id, $friend_user_id );
}

Changelog

Changelog
Version Description
BuddyPress 1.2.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.