diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/classes/ElggUser.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/engine/classes/ElggUser.php b/engine/classes/ElggUser.php index cceaacf58..5c65a4d66 100644 --- a/engine/classes/ElggUser.php +++ b/engine/classes/ElggUser.php @@ -360,20 +360,23 @@ class ElggUser extends ElggEntity * * @param string $subtype Optionally, the user subtype (leave blank for all) * @param int $limit The number of users to retrieve - * @param int $offset Indexing offset, if any + * @param array $vars Display variables for the user view * - * @return string + * @return string Rendered list of friends + * @since 1.8.0 */ - function listFriends($subtype = "", $limit = 10, $offset = 0) { - $options = array( + function listFriends($subtype = "", $limit = 10, array $vars = array()) { + $defaults = array( 'type' => 'user', 'relationship' => 'friend', 'relationship_guid' => $this->guid, 'limit' => $limit, - 'offset' => $offset, + 'offset' => get_input('offset', 0), 'full_view' => false, ); + $options = array_merge($defaults, $vars); + if ($subtype) { $options['subtype'] = $subtype; } |