Skip to content

Node.js based forum software built for the modern web

closes #4180

barisusakli8276090d717f
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);