From 4d0762805448d285c2e6fba12a71b71c22496e13 Mon Sep 17 00:00:00 2001 From: Rafael de Camargo Date: Mon, 26 Aug 2019 01:59:53 -0300 Subject: Add hash to image url to force browser to update profile when changed Closes #4241 --- app/User/Avatar/AvatarFileProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/User') 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 '' . $title . ''; } -- cgit v1.2.3