mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
Merge pull request #459 from bigcapitalhq/skip-sending-confirm-email-if-disabled
fix: skip send confirmation email if disabled
This commit is contained in:
@@ -11,6 +11,9 @@ export interface ISystemUser extends Model {
|
||||
password: string;
|
||||
email: string;
|
||||
|
||||
verifyToken: string;
|
||||
verified: boolean;
|
||||
|
||||
roleId: number;
|
||||
tenantId: number;
|
||||
|
||||
|
||||
@@ -20,6 +20,10 @@ export class SendVerfiyMailOnSignUp {
|
||||
private handleSendVerifyMailOnSignup = async ({
|
||||
user,
|
||||
}: IAuthSignedUpEventPayload) => {
|
||||
// Can't continue if the user is verified.
|
||||
if (user.verified) {
|
||||
return;
|
||||
}
|
||||
const payload = {
|
||||
email: user.email,
|
||||
token: user.verifyToken,
|
||||
|
||||
Reference in New Issue
Block a user