owner_guid); // the number of friends to display $num = (int) $vars['entity']->num_display; // get the correct size $size = $vars['entity']->icon_size; // Get the user's friends $friends = $owner->getFriends("", $num); // If there are any friends to view, view them if (is_array($friends) && sizeof($friends) > 0) { echo "
"; foreach($friends as $friend) { echo "
"; echo elgg_view("profile/icon",array('entity' => get_user($friend->guid), 'size' => $size)); echo "
"; } echo "
"; }