change requireEmail default to off

v1.18.x
barisusakli 11 years ago
parent 4aec62f3eb
commit 65e9f68d73

@ -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]]'));
}

@ -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);
}
}

Loading…
Cancel
Save