friends_get_friend_user_ids( int $user_id, bool $friend_requests_only = false, bool $assoc_arr = false )

Get the IDs of a given user’s friends.

Parameters Parameters


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


(bool) (Optional) Whether to fetch unaccepted requests only. Default: false.

Default value: false


(bool) (Optional) True to receive an array of arrays keyed as 'user_id' => $user_id; false to get a one-dimensional array of user IDs. Default: false.

Default value: false

Top ↑

Return Return


Source Source

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

function friends_get_friend_user_ids( $user_id, $friend_requests_only = false, $assoc_arr = false ) {
	return BP_Friends_Friendship::get_friend_user_ids( $user_id, $friend_requests_only, $assoc_arr );

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.