mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +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;
|
password: string;
|
||||||
email: string;
|
email: string;
|
||||||
|
|
||||||
|
verifyToken: string;
|
||||||
|
verified: boolean;
|
||||||
|
|
||||||
roleId: number;
|
roleId: number;
|
||||||
tenantId: number;
|
tenantId: number;
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ export class SendVerfiyMailOnSignUp {
|
|||||||
private handleSendVerifyMailOnSignup = async ({
|
private handleSendVerifyMailOnSignup = async ({
|
||||||
user,
|
user,
|
||||||
}: IAuthSignedUpEventPayload) => {
|
}: IAuthSignedUpEventPayload) => {
|
||||||
|
// Can't continue if the user is verified.
|
||||||
|
if (user.verified) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const payload = {
|
const payload = {
|
||||||
email: user.email,
|
email: user.email,
|
||||||
token: user.verifyToken,
|
token: user.verifyToken,
|
||||||
|
|||||||
Reference in New Issue
Block a user