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.
Description Description
Parameters Parameters
- $user_id
-
(Required) ID of the user whose friends are being retrieved.
- $friend_requests_only
-
(Optional) Whether to fetch unaccepted requests only. Default: false.
Default value: false
- $assoc_arr
-
(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
Return Return
(array)
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 ); }
Changelog Changelog
Version | Description |
---|---|
1.0.0 | Introduced. |