diff options
author | lkisme <lkisme@me.com> | 2017-02-26 21:11:15 +0800 |
---|---|---|
committer | lkisme <lkisme@me.com> | 2017-02-26 21:11:15 +0800 |
commit | 39f2837838ba30ec02bfe9f33c9fa0dfca05d1a6 (patch) | |
tree | 775e276109af00cb42ee81c8aaa03903b38764da /models/users.js | |
parent | e3c3cc0d8df14c84852a854383efa1b4bb83f218 (diff) | |
download | wekan-39f2837838ba30ec02bfe9f33c9fa0dfca05d1a6.tar.gz wekan-39f2837838ba30ec02bfe9f33c9fa0dfca05d1a6.tar.bz2 wekan-39f2837838ba30ec02bfe9f33c9fa0dfca05d1a6.zip |
wording change, email sending optimization, add texts to i18n
Diffstat (limited to 'models/users.js')
-rw-r--r-- | models/users.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/models/users.js b/models/users.js index c7db8fff..b77c7a84 100644 --- a/models/users.js +++ b/models/users.js @@ -348,7 +348,7 @@ if (Meteor.isServer) { if (user._id === inviter._id) throw new Meteor.Error('error-user-notAllowSelf'); } else { if (posAt <= 0) throw new Meteor.Error('error-user-doesNotExist'); - if (Settings.findOne().strict) throw new Meteor.Error('error-user-notCreated'); + if (Settings.findOne().disableRegistration) throw new Meteor.Error('error-user-notCreated'); const email = username; username = email.substring(0, posAt); const newUserId = Accounts.createUser({ username, email }); @@ -395,8 +395,8 @@ if (Meteor.isServer) { user.isAdmin = true; return user; } - const strict = Settings.findOne().strict; - if (!strict) { + const disableRegistration = Settings.findOne().disableRegistration; + if (!disableRegistration) { return user; } @@ -484,8 +484,8 @@ if (Meteor.isServer) { Users.after.insert((userId, doc) => { //invite user to corresponding boards - const strict = Settings.findOne().strict; - if (strict) { + const disableRegistration = Settings.findOne().disableRegistration; + if (disableRegistration) { const user = Users.findOne(doc._id); const invitationCode = InvitationCodes.findOne({code: user.profile.icode, valid:true}); if (!invitationCode) { |