Multiple users per account

Ive been racking my head around this for a while and I cant seem to figure anything out (if its at all possible) Any help with this would be greatly appreciated!

Ive built a studio app…

-A teacher has an account with however many classrooms they need. They can send students in their class’s assignments to complete.

-A Student has an account and can join a teachers class. They can view assignments based on the class they choose from their dashboard (if they are in more than 1).

Let’s say I have a family that needs their children (more than one) to have their own account but not want to create multiple different logins.

Can I have a user set up multiple accounts (within their account) and swap through them within their account?

Hi @Jacob_Lange,

It is not possible for one account to have two users but why not rethink your data structure? user types can be teachers and families instead of students.

Each family(user) can add as many children(another dataset) to their account as they need; this way each family has a single login that leads to a screen with all their children. Each child can use this same login to access their own classes.

Teachers can still add students(children) to their classes but the datatype will be children instead of users.

A parent can set a password so that kids can only access their own classes instead of their siblings’.

4 Likes

@Hanan ahh okay, that makes so much sense! I have been using “Join table” type collections to avoid many to many relationships.

I assume I can do this same thing for a user that chooses a true/false “family” and allow them to create a Join Table for each their Children. Then within that join table I can add the class and any assignments the teacher adds. Am I looking at this the right way?

1 Like

if I understand your intention correctly then yes, definitely.

But with slightly better UX; if all families need to see all their kids classes table on one screen(no need to split them to separate screens, I mean) , then no need to add a checkbox for family. The table will display all class data for this user(family) children, be it one or 10 kids. Same interface with less work on the user side.

1 Like

I may a similar situation. Developing an app for health coaches and their clients. The coach is the primary user and started with the one to many relationship scenario, but also want clients to be able to login. It seems as there is only one collection that allows for login and that is users.

So if I reverse my thinking I would start with all users in one file, with a property for coach or client then have different paths for each and a many to one relationship clients to coaches and also a one to many relationship for clients to activities. I would also like coaches to be able to see all activities of all their clients grouped together.

Makes sense? Possible?

I think you might be better off thinking about your relationships slightly different based on the product.

You have a teaching environment and you’re trying to either add a moderator roll into this environment (parents) or you’re trying to add a passwordless signup situation (I might not recommend that last part).

I do think it gets more complicated when you add in the assignments aspect that you had at the beginning.

I think that you have two management roles going on.

A teacher to student relationship
And a Parent to Child relationship.

And you want to maintain the student to assignment relationship.

I would work on a secondary Parent to Child (moderator) relationship outside of your Content management system.

Always prioritize your main structure (learning content / Teacher & Student relationship) and then build out from there.

It’s easy to get confused in database relationships.

I would personally build out the second part as a moderator panel that has the ability to create up to X students (as a moderator would / could in most systems). And oversee those specific roles. But you’re not necessarily prioritizing their teaching / student relationship, their role is there as a moderator / pseudo-administrator.

This also keeps the students separate for their assignments which are one assignment to one student per lesson (I assume).

If you add in a single log in, I could see assignments getting messy very fast

Hi @GaryA ,

Possible to make duplication of users collection to another collection to have 1-to-M to get more detailed data tracked, but need to be careful to make them sync.

Hanan, I need help with a similar scenario.

My club allows entire families to be members, but I want to manage their activity under a single primary user. For example, the husband may be the primary member. As a user, he has a Member ID number, which my app assigns automatically when he creates his user account. This lets him do things in my club, like borrow items, use computers, etc. When he enters our physical store, he shows his profile screen at the door. That serves as his member ID card.

But, that user’s wife and adult children can also come into the club and access services too. If one of them comes into the store alone, they would show their own profile screen (with their own profile picture, but the primary member’s Member ID number. If that family member borrows an item, the transaction would be recorded under the primary member’s account (with an annotation that the family member is actually the one who borrowed it).

I want each family member to have their own login (or some other way to let them have their own profile) but I want everything they do at the club to be trackable under the primary member’s account. And I really don’t want them to have their own unique user ID number.

Can you suggest a way to make this work?

hey @MikesClub and sorry for the late reply, I’m currently on break.
I see what you are tying to do, but still you can’t create a record of type user without having a unique user ID for each user. So again, I suggest having one user login (parent) and that user creates records of type (family member - not users) related to their ID. And on login screen, the parent logs in first then each member can access their profile from a list on the parent’s home. You can add a password to each member that prevents another family member from accessing each other’s profiles. I may absolutely be wrong but this is the securest way the way I see it