summaryrefslogtreecommitdiffstats
path: root/client/components/users/userAvatar.js
diff options
context:
space:
mode:
Diffstat (limited to 'client/components/users/userAvatar.js')
-rw-r--r--client/components/users/userAvatar.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/client/components/users/userAvatar.js b/client/components/users/userAvatar.js
index 91cad237..5fb5d9df 100644
--- a/client/components/users/userAvatar.js
+++ b/client/components/users/userAvatar.js
@@ -14,6 +14,13 @@ Template.userAvatar.helpers({
});
},
+ fixAvatarUrl(avatarUrl) {
+ // Remove suburl from beginning of avatar file path,
+ // so that avatar images don't get broken when root-url changes to different sub-url.
+ avatarUrl = '/' + avatarUrl.substring(avatarUrl.indexOf('/cfs/files/avatars/')+1);
+ return avatarUrl;
+ },
+
memberType() {
const user = Users.findOne(this.userId);
return user && user.isBoardAdmin() ? 'admin' : 'normal';