Skip to content

Node.js based forum software built for the modern web

dont crash if user doesn't have email

barisusakli977cd98a797b
diff --git a/src/user/profile.js b/src/user/profile.js
index e8d42da6d5..8b46f53994 100644
--- a/src/user/profile.js
+++ b/src/user/profile.js
@@ -123,6 +123,8 @@ module.exports = function(User) {
return callback(err);
}
+ userData.email = userData.email || '';
+
if (userData.email === newEmail) {
return callback();
}