summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/User/Avatar/AvatarFileProvider.php2
-rw-r--r--tests/units/Formatter/UserMentionFormatterTest.php2
2 files changed, 2 insertions, 2 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 . '">';
}
diff --git a/tests/units/Formatter/UserMentionFormatterTest.php b/tests/units/Formatter/UserMentionFormatterTest.php
index 6338e80f..92f73d16 100644
--- a/tests/units/Formatter/UserMentionFormatterTest.php
+++ b/tests/units/Formatter/UserMentionFormatterTest.php
@@ -29,7 +29,7 @@ class UserMentionFormatterTest extends Base
$expected = array(
array(
'value' => 'someone',
- 'html' => '<div class="avatar avatar-20 avatar-inline"><img src="?controller=AvatarFileController&amp;action=image&amp;user_id=1&amp;size=20" alt="Someone" title="Someone"></div> someone <small>Someone</small>',
+ 'html' => '<div class="avatar avatar-20 avatar-inline"><img src="?controller=AvatarFileController&amp;action=image&amp;user_id=1&amp;hash=5acc03af0274414544b9615fb223d925&amp;size=20" alt="Someone" title="Someone"></div> someone <small>Someone</small>',
),
array(
'value' => 'somebody',