Send invites to users?

Is there any way to send invites to other users?
Let me try to explain with a food ordering example:
You have restaurants where users only can order food if invited. So the restaurant needs to send an invite to a user before the user can order from that restaurant. A user can also have multiple other restaurants they can order from, but only if those restaurants also have sent an invite.

Hello, yes for sure it’s possible, by creating relationship between the restaurants and users, and only the users that get invited to the restaurant can order from it.

Thank you!

Thank you for your quick reply. I have a relationship between the two collections, but it´s not clear to me how to send the invite, or how to connect them together?

Can you please specify the type of the relationship? Is it many to many?

Thank you!

Yes. Many to many

Okay perfect, so you can call this relationship “Invite list” and then you can restrict the entering or ordering process from this restaurant to be only if (Current restaurant => Invite list contains Looged in user).

I hope I have your problem.
Thank you!