Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions app/2fa/server/code/EmailCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ ${ t('If_you_didnt_try_to_login_in_your_account_please_ignore_this_email') }
return !!valid;
}

public sendEmailCode(user: IUser): string[] {
public sendEmailCode(user: IUser): void {
const emails = this.getUserVerifiedEmails(user);
const random = Random._randomString(6, '0123456789');
const encryptedRandom = bcrypt.hashSync(random, Accounts._bcryptRounds());
Expand All @@ -108,8 +108,6 @@ ${ t('If_you_didnt_try_to_login_in_your_account_please_ignore_this_email') }
for (const address of emails) {
this.send2FAEmail(address, random, user);
}

return emails;
}

public processInvalidCode(user: IUser): IProcessInvalidCodeResult {
Expand Down
4 changes: 3 additions & 1 deletion app/api/server/v1/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,9 @@ API.v1.addRoute('users.2fa.sendEmailCode', {
throw new Meteor.Error('error-invalid-user', 'Invalid user');
}

return API.v1.success(emailCheck.sendEmailCode(getUserForCheck(userId)));
emailCheck.sendEmailCode(getUserForCheck(userId));

return API.v1.success();
},
});

Expand Down