mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
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