Remove invitation code if email sending failed, improve registration process with invitation

This commit is contained in:
lkisme 2017-03-28 00:48:18 +08:00
parent feafc46bb5
commit f82941550a
4 changed files with 19 additions and 12 deletions

View file

@ -104,6 +104,7 @@ if (Meteor.isServer) {
text: TAPi18n.__('email-invite-register-text', params, lang),
});
} catch (e) {
InvitationCodes.remove(_id);
throw new Meteor.Error('email-fail', e.message);
}
}