Skip to main content

autoAcceptInvitationsForNewUser

@nmi-agro/fdm-source


@nmi-agro/fdm-source / fdm-core/src / autoAcceptInvitationsForNewUser

Function: autoAcceptInvitationsForNewUser()

autoAcceptInvitationsForNewUser(fdm, email, user_id): Promise<void>

Defined in: fdm-core/src/invitation.ts:603

Automatically accepts all pending invitations for a newly verified user.

Looks up pending invitations matching the user's email address across all resources and grants the corresponding roles. MUST only be called when emailVerified is confirmed.

Parameters

fdm

any

The FDM instance providing the connection to the database.

email

string

The verified email address of the user.

user_id

string

The ID of the newly verified user.

Returns

Promise<void>