diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-06-19 08:37:04 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-06-19 08:37:04 -0400 |
commit | 1c0234e0caebff139f707505ae353392ef3b7372 (patch) | |
tree | 04145c752cc5d97ae9b2b49d77118f37d6fd68d5 /views/default/widgets/friends/content.php | |
parent | 2b68a4d217c35a5587c462620789493cf2804ba2 (diff) | |
download | elgg-1c0234e0caebff139f707505ae353392ef3b7372.tar.gz elgg-1c0234e0caebff139f707505ae353392ef3b7372.tar.bz2 |
Fixes #3581 checks that the owner of a friends widget is a user
Diffstat (limited to 'views/default/widgets/friends/content.php')
-rw-r--r-- | views/default/widgets/friends/content.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/views/default/widgets/friends/content.php b/views/default/widgets/friends/content.php index 4c5ef5b4a..ec842a252 100644 --- a/views/default/widgets/friends/content.php +++ b/views/default/widgets/friends/content.php @@ -13,12 +13,12 @@ $num = (int) $vars['entity']->num_display; // get the correct size $size = $vars['entity']->icon_size; -$html = $owner->listFriends('', $num, array( - 'size' => $size, - 'gallery' => true, -)); -if ($html) { - echo $html; -} else { - +if (elgg_instanceof($owner, 'user')) { + $html = $owner->listFriends('', $num, array( + 'size' => $size, + 'gallery' => true, + )); + if ($html) { + echo $html; + } } |