not requiring email any longer for user creation (regression -- closes julianlam/nodebb-plugin-sso-twitter#4)

v1.18.x
Julian Lam 11 years ago
parent ba16f95d1f
commit ee44128c8c

@ -21,7 +21,11 @@ module.exports = function(User) {
async.parallel([
function(next) {
next(!utils.isEmailValid(userData.email) ? new Error('Invalid Email!') : null);
if (userData.email) {
next(!utils.isEmailValid(userData.email) ? new Error('Invalid Email!') : null);
} else {
next();
}
},
function(next) {
next((!utils.isUserNameValid(userData.username) || !userData.userslug) ? new Error('Invalid Username!') : null);

Loading…
Cancel
Save