Skip to main content

Module invitations

Module invitations 

Source
Expand description

Users a tenant creates for someone else. Each is an invitation until the person proves they own the address and accepts. Acceptance sets emailVerified, which login requires and clients cannot set.

Constants§

INVITATION_VALID_FOR
How long an invitation link works.

Functions§

accept
Accepts the user: sets emailVerified on the User resource so the row follows, or on the row alone if there is no resource.
decline
Deletes an unaccepted user, through its User resource if it has one. Its memberships cascade with the row.
delete_invitation_code
Spends an invitation code.
find_invitation
The user an unexpired invitation code is for.
resource_email_verified
emailVerified, or false when absent.
send_invitation
Emails a new user a link to accept or decline. Failures are only logged: the user can still accept by logging in.
set_resource_email_verified
Sets emailVerified, keeping the element’s other fields.
tenant_display_name
The tenant’s display name, or its id if it has none.