Meteor-Vue-Enterprise-Starter
Meteor-Vue-Enterprise-Starter copied to clipboard
User Invitations
Allow user invites to be sent from the admin accounts page.
To do:
-
add UI in
PageAccountsAdminInvites
to browser invites, create new ones, and delete existing invites -
create new unverified user with
createUnverifiedUser.call({ invite: true })
-
in
createUnverifiedUser
- if
invite
provided, create a new invite ininvitesCollection
- then add
_id
from the new invite to user viauser.userInviteId = <doc id>
inAccounts.onCreateUser()
- if
invite
is provided then send an invite email with link to new page to accept invite, instead of an enroll email like usual
- if
-
create new route
/accept-invite
for accepting invite and creating user, pretty much copy/paste ofEnrollAccountForm
- when user submits form, call new meteor method
createUserFromInvite.call()
- when user submits form, call new meteor method
-
in
createUserFromInvite
method- check that
inviteId
matchesuserInviteId
- find invite from
invitesCollection
, mark it as accepted - set the user as verified
- check that
-
allow a config value to determine if user invites are required for creating accounts, or optional