summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-12-30 19:16:49 +0100
committerMaxime Quandalle <maxime@quandalle.com>2015-12-30 19:36:01 +0100
commit0587223489b3c2e44c7670cb12dac1d221f0a455 (patch)
tree3a938e8c27e7a52ba18e02646bf3b3eb7a0254e6 /models
parent15e692a7d27f36d2f5079d4e74232c2dd4fb5e58 (diff)
downloadwekan-0587223489b3c2e44c7670cb12dac1d221f0a455.tar.gz
wekan-0587223489b3c2e44c7670cb12dac1d221f0a455.tar.bz2
wekan-0587223489b3c2e44c7670cb12dac1d221f0a455.zip
Fix avatar support on Sanstorm
The bug comes for 9154b06 which this commit partially reverts. The synchronization between the user document profile and the Sandstorm HTTP headers is still not perfect. Having a clean model may requires the `accounts-sandstorm` to expose a hook to modify the user document just after the `services.sandstorm` credentials are updated. Fixes #460
Diffstat (limited to 'models')
-rw-r--r--models/users.js13
1 files changed, 0 insertions, 13 deletions
diff --git a/models/users.js b/models/users.js
index cf4c4193..8dd5ed78 100644
--- a/models/users.js
+++ b/models/users.js
@@ -47,19 +47,6 @@ Users.helpers({
return _.contains(invitedBoards, boardId);
},
- getAvatarUrl() {
- // Although we put the avatar picture URL in the `profile` object, we need
- // to support Sandstorm which put in the `picture` attribute by default.
- // XXX Should we move both cases to `picture`?
- if (this.picture) {
- return this.picture;
- } else if (this.profile && this.profile.avatarUrl) {
- return this.profile.avatarUrl;
- } else {
- return null;
- }
- },
-
getInitials() {
const profile = this.profile || {};
if (profile.initials)