@ -434,7 +434,7 @@ accountsController.uploadPicture = function (req, res, next) {
user.setUserFields(updateUid, {uploadedpicture: image.url, picture: image.url});
res.json([{name: userPhoto.name, url: nconf.get('relative_path') + image.url}]);
res.json([{name: userPhoto.name, url: image.url.startsWith('http') ? image.url : nconf.get('relative_path') + image.url}]);
}
if (err) {
@ -120,7 +120,7 @@ var async = require('async'),
if (user.picture) {
if (user.picture === user.uploadedpicture) {
user.picture = user.uploadedpicture = user.picture.indexOf('http') === -1 ? nconf.get('relative_path') + user.picture : user.picture;
user.picture = user.uploadedpicture = user.picture.startsWith('http') ? user.picture : nconf.get('relative_path') + user.picture;
} else {
user.picture = User.createGravatarURLFromEmail(user.email);