summaryrefslogtreecommitdiff
path: root/app/User/Avatar/AvatarFileProvider.php
diff options
context:
space:
mode:
authorRafael de Camargo <rafacamargo123@gmail.com>2019-08-26 01:59:53 -0300
committerFrédéric Guillot <fred@kanboard.net>2019-08-27 20:19:51 -0700
commit4d0762805448d285c2e6fba12a71b71c22496e13 (patch)
tree428ea2a1f2daeef952a66a6a220b935cce43f8b2 /app/User/Avatar/AvatarFileProvider.php
parent8b2d46ed5d4f3d3789696478f69d08a3b11323d9 (diff)
Add hash to image url to force browser to update profile when changed
Closes #4241
Diffstat (limited to 'app/User/Avatar/AvatarFileProvider.php')
-rw-r--r--app/User/Avatar/AvatarFileProvider.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/User/Avatar/AvatarFileProvider.php b/app/User/Avatar/AvatarFileProvider.php
index 790245a4..b6486cea 100644
--- a/app/User/Avatar/AvatarFileProvider.php
+++ b/app/User/Avatar/AvatarFileProvider.php
@@ -23,7 +23,7 @@ class AvatarFileProvider extends Base implements AvatarProviderInterface
*/
public function render(array $user, $size)
{
- $url = $this->helper->url->href('AvatarFileController', 'image', array('user_id' => $user['id'], 'size' => $size));
+ $url = $this->helper->url->href('AvatarFileController', 'image', array('user_id' => $user['id'], 'hash' => md5($user['avatar_path']), 'size' => $size));
$title = $this->helper->text->e($user['name'] ?: $user['username']);
return '<img src="' . $url . '" alt="' . $title . '" title="' . $title . '">';
}