aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/users.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/users.php')
-rw-r--r--engine/lib/users.php11
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";
+ }
}
/**