diff --git a/src/user.js b/src/user.js index dee7496928..5d5083df30 100644 --- a/src/user.js +++ b/src/user.js @@ -176,7 +176,7 @@ var bcrypt = require('bcryptjs'), return callback(new Error('[[error:no-user]]')); } - if (userData.email && (parseInt(meta.config.requireEmailConfirmation, 10) === 1 || meta.config.requireEmailConfirmation === undefined) && parseInt(userData['email:confirmed'], 10) !== 1) { + if (userData.email && parseInt(meta.config.requireEmailConfirmation, 10) === 1 && parseInt(userData['email:confirmed'], 10) !== 1) { return callback(new Error('[[error:email-not-confirmed]]')); } diff --git a/src/user/create.js b/src/user/create.js index 3f4a78de81..e6d4a61c97 100644 --- a/src/user/create.js +++ b/src/user/create.js @@ -137,7 +137,7 @@ module.exports = function(User) { if (userData.email !== undefined) { db.setObjectField('email:uid', userData.email, uid); - if (parseInt(uid, 10) !== 1 && (parseInt(meta.config.requireEmailConfirmation, 10) === 1 || meta.config.requireEmailConfirmation === undefined)) { + if (parseInt(uid, 10) !== 1 && parseInt(meta.config.requireEmailConfirmation, 10) === 1) { User.email.verify(uid, userData.email); } }