diff options
author | Maxime Corteel <mcorteel@gmail.com> | 2016-03-29 16:16:12 +0200 |
---|---|---|
committer | Maxime Corteel <mcorteel@gmail.com> | 2016-03-29 16:16:12 +0200 |
commit | 41f753d02733aa3c2c879caf5d914feb76c54388 (patch) | |
tree | ad1b3570c33a30281fdda47324bd2e154a064243 /app/User | |
parent | 82b47f74001dc1e5625eff298c463e6a828884e0 (diff) |
Generate avatar color based on name instead of initials
Diffstat (limited to 'app/User')
-rw-r--r-- | app/User/Avatar/LetterAvatarProvider.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/User/Avatar/LetterAvatarProvider.php b/app/User/Avatar/LetterAvatarProvider.php index cf04f2a7..f9659e61 100644 --- a/app/User/Avatar/LetterAvatarProvider.php +++ b/app/User/Avatar/LetterAvatarProvider.php @@ -31,7 +31,7 @@ class LetterAvatarProvider extends Base implements AvatarProviderInterface public function render(array $user, $size) { $initials = $this->helper->user->getInitials($user['name'] ?: $user['username']); - $rgb = $this->getBackgroundColor($initials); + $rgb = $this->getBackgroundColor($user['name'] ?: $user['username']); return sprintf( '<div class="avatar-letter" style="background-color: rgb(%d, %d, %d)" title="%s">%s</div>', |