Attach users to tenant

This feels like a very simple thing, yet I can't figure it out. Users have a many-to-many relationship with tenants. Now, someone who already belongs to a tenant, should be able to attach his friends to it as well.

I think it's possible with a multiple() select field in the site profile page, however I would like to do it via attach/detach buttons.

I already have a UserResource with all the users belonging to the tenant, but attach buttons only seems to be working in relation managers, while this is just a resource.

What are my options?
Solution
This is something you should build yourself (invitations). Typically you create a new Invitation model with a tenant id, email and hash. You can also opt to be able to pre assign a tenant role. Another good practice is an expiration date. Set up a notification (email) and a public page that will be used to enter name(s) / password / etc. Check the hash on load and create and after user creation, redirect to the tenant. If the user’s email already exists on another tenant you could serve a ‘Accept invitation’ variant and skip the password setting etc.
Was this page helpful?