Miltitenant user logic

Hello Bubblere,
I almost pulled my hair searching for a solution.
So building a Saas app like Shopify.
Main users are my websites owners in my apps and when they signup I sign them up using bubble signup user wf.
So for instance in my app I have two users:

  1. Name: Mike, Shop: shopABC Etc…
  2. Name: David, Shop: shopXYZ etc …

    Now, when normal visitors wants to sign up to these shops I made a new database type called it (shop_user) and when a visitor signs up to a shop I make (shop_user) by the input email, input password and I made a field called (logged in) and I make it yes, and when they log out I make change to (logged in) to No.
    My problem is I am struggling to pull data assigned to each Shop_user.
    In the shop user I tried to assign a field called it (id= current user’s unique id) using bubble automatic current user cookie feature.
    Still struggling :sleepy:.
    Any easier way?
    Much appreciated

This is a confusing naming convention… Unless it’s a join table, call it Shop or something.

Why? I’m confused - Bubble already allows you to know if a user is logged in using the Current user’s logged in conditional.

Have you checked your privacy rules?

No… The Shop’s User should be of type User and you save Current user, not Current user’s unique ID (which is a string)

You misunderstood me sorry I wasn’t clear.
The reason I didn’t use bubbe normal user data is…
If I have 10 shops on my app, remember my app is like Shopify where eachshop will have separatedomain, these apps are owned by users ( signed up using normal bubble data) .
These shops have visitors and these visitors doesn’t know that all these 10 shops belong to my app.
So same visitor might coincidently tries to sign up to two of these shops.
Now this visitor cant sign up in the same database twice with the same email cause bubble won’t let same email to register twice.
So I had to use another user data called it ( shop_user)
Hope it’s clearer now