diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-05 22:46:28 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-02-05 22:46:28 +0000 |
commit | e5227e9221edbce84eee82af7f2c9903de702f37 (patch) | |
tree | 5e402b5508a8af64ff40761087926dd0f9443303 /engine/lib/users.php | |
parent | 577eb6f725449fea5738ca122eedb5e4b2c8ff56 (diff) | |
download | elgg-e5227e9221edbce84eee82af7f2c9903de702f37.tar.gz elgg-e5227e9221edbce84eee82af7f2c9903de702f37.tar.bz2 |
Fixes #2559 refs #2475 added ElggEntity:getIconURL() and elgg_view_entity_icon()
git-svn-id: http://code.elgg.org/elgg/trunk@8039 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r-- | engine/lib/users.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/engine/lib/users.php b/engine/lib/users.php index 567f587ea..be7399a44 100644 --- a/engine/lib/users.php +++ b/engine/lib/users.php @@ -1276,10 +1276,15 @@ function user_create_hook_add_site_relationship($event, $object_type, $object) { * @param array $params * @return string */ -function user_avatar_hook($hook, $entity_type, $returnvalue, $params){ - $entity = $params['entity']; +function user_avatar_hook($hook, $entity_type, $returnvalue, $params) { + $user = $params['entity']; $size = $params['size']; - return "pg/avatar/view/{$entity->username}?size=$size"; + + if (isset($user->icontime)) { + return "pg/avatar/view/$user->username?size=$size"; + } else { + return "_graphics/icons/user/default{$size}.gif"; + } } /** |