From 1a9ab9d1d2fc273eb7875a40e7bde6d9dec7ac5c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sun, 11 May 2014 19:39:52 -0400 Subject: [PATCH] fixes default gravatar images if they are uploaded locally --- src/user.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/user.js b/src/user.js index 077a1e3d0f..43d30b353c 100644 --- a/src/user.js +++ b/src/user.js @@ -274,10 +274,14 @@ var bcrypt = require('bcryptjs'), }; User.createGravatarURLFromEmail = function(email) { + var customGravatarDefaultImage = meta.config.customGravatarDefaultImage; + if (customGravatarDefaultImage && customGravatarDefaultImage.indexOf('http') === -1) { + customGravatarDefaultImage = nconf.get('url') + meta.config.customGravatarDefaultImage; + } var options = { size: '128', - default: meta.config.customGravatarDefaultImage || meta.config.defaultGravatarImage || '', + default: customGravatarDefaultImage || meta.config.defaultGravatarImage || '', rating: 'pg' };