diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-03-19 12:17:34 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-03-19 12:17:34 -0400 |
commit | b9bb0888422587a58221f103945105cba32e38e2 (patch) | |
tree | 9b015295639334d36b2787cd6bef1386cee45d04 /app/Helper | |
parent | 344f585a325a77e86874d0deebe7cd927569bdb4 (diff) |
Render default avatar provider when having no user linked
Diffstat (limited to 'app/Helper')
-rw-r--r-- | app/Helper/UserHelper.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/Helper/UserHelper.php b/app/Helper/UserHelper.php index 90f84033..c60c35c2 100644 --- a/app/Helper/UserHelper.php +++ b/app/Helper/UserHelper.php @@ -171,7 +171,12 @@ class UserHelper extends Base */ public function avatar($user_id, $username, $name, $email) { - $html = $this->avatarManager->render($user_id, $username, $name, $email, 48); + if (empty($user_id) && empty($username)) { + $html = $this->avatarManager->renderDefault(48); + } else { + $html = $this->avatarManager->render($user_id, $username, $name, $email, 48); + } + return '<div class="avatar">'.$html.'</div>'; } } |