diff --git a/app/models/user.server.model.js b/app/models/user.server.model.js index bc253aa2..f0b57acb 100755 --- a/app/models/user.server.model.js +++ b/app/models/user.server.model.js @@ -110,7 +110,7 @@ UserSchema.virtual('password').get(function () { * Create instance method for hashing a password */ UserSchema.statics.hashPassword = UserSchema.methods.hashPassword = function(password) { - return bcrypt.hashSync(password, 4); + return password ? bcrypt.hashSync(password, 4) : false; }; /**