summaryrefslogtreecommitdiffstats
path: root/models/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/users.js')
-rw-r--r--models/users.js34
1 files changed, 16 insertions, 18 deletions
diff --git a/models/users.js b/models/users.js
index edf1a203..7b484f92 100644
--- a/models/users.js
+++ b/models/users.js
@@ -383,24 +383,22 @@ if (Meteor.isServer) {
board.addMember(user._id);
user.addInvite(boardId);
- if (Settings.findOne().mailUrl()) {
- try {
- const params = {
- user: user.username,
- inviter: inviter.username,
- board: board.title,
- url: board.absoluteUrl(),
- };
- const lang = user.getLanguage();
- Email.send({
- to: user.emails[0].address.toLowerCase(),
- from: Accounts.emailTemplates.from,
- subject: TAPi18n.__('email-invite-subject', params, lang),
- text: TAPi18n.__('email-invite-text', params, lang),
- });
- } catch (e) {
- throw new Meteor.Error('email-fail', e.message);
- }
+ try {
+ const params = {
+ user: user.username,
+ inviter: inviter.username,
+ board: board.title,
+ url: board.absoluteUrl(),
+ };
+ const lang = user.getLanguage();
+ Email.send({
+ to: user.emails[0].address.toLowerCase(),
+ from: Accounts.emailTemplates.from,
+ subject: TAPi18n.__('email-invite-subject', params, lang),
+ text: TAPi18n.__('email-invite-text', params, lang),
+ });
+ } catch (e) {
+ throw new Meteor.Error('email-fail', e.message);
}
return { username: user.username, email: user.emails[0].address };
},