From 8276090d717f25c91a220eb99bce8233c68d20c8 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 13 Feb 2016 14:39:44 +0200 Subject: [PATCH] closes #4180 --- src/socket.io/user/profile.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/socket.io/user/profile.js b/src/socket.io/user/profile.js index 8f8811ef06..bd73b7ff7c 100644 --- a/src/socket.io/user/profile.js +++ b/src/socket.io/user/profile.js @@ -54,7 +54,13 @@ module.exports = function(SocketUser) { async.parallel({ isAdmin: async.apply(user.isAdministrator, uid), hasPassword: async.apply(user.hasPassword, data.uid), - passwordMatch: async.apply(user.isPasswordCorrect, data.uid, data.password) + passwordMatch: function(next) { + if (data.password) { + user.isPasswordCorrect(data.uid, data.password, next); + } else { + next(null, false); + } + } }, function(err, results) { if (err) { return callback(err);