Skip to content

Node.js based forum software built for the modern web

setting password to null in getUserData, because Object.delete is bad? :P (thanks @barisusakli)

Julian Lamb2bc1d4555d3
diff --git a/src/user.js b/src/user.js
index 9d81f2ea71..6b425fd401 100644
--- a/src/user.js
+++ b/src/user.js
@@ -187,7 +187,7 @@ var bcrypt = require('bcryptjs'),
if (data) {
if (data.password) {
- delete data.password;
+ data.password = null;
data.hasPassword = true;
} else {
data.hasPassword = false;