From 3da4671944e4220f0b2020df24cc040ce3b6d9b8 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Thu, 3 Aug 2017 12:34:56 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fixed=20user=20images=20not=20be?= =?UTF-8?q?ing=20imported=20properly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #8833 - Don't re-run gravatar check when importing users --- core/server/models/user.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/server/models/user.js b/core/server/models/user.js index 6c249637039b..27bb3fb71467 100644 --- a/core/server/models/user.js +++ b/core/server/models/user.js @@ -110,7 +110,8 @@ User = ghostBookshelf.Model.extend({ ghostBookshelf.Model.prototype.onSaving.apply(this, arguments); - if (self.hasChanged('email') && self.get('email')) { + // If the user's email is set & has changed & we are not importing + if (self.hasChanged('email') && self.get('email') && !options.importing) { tasks.gravatar = (function lookUpGravatar() { return gravatar.lookup({ email: self.get('email')