How to make relationships between users I have the quiz module installed on my website. I have setup two user roles on my site, Student and Parents.

I want to make a view that shows the results of a parents children.

Now I have made two fields in the registration using the profile module.

The number of student
The number of parent


These two fields are now available both for parents and their children. How can I fetch the results of a parents children using this relationship?

I'm thinking I should I say:Show the result of the users were the field "profile_no" is the same?

Is there a better way to make relation between two users?

Thanks everyone!
Using the Entity reference module you can reference all entities (nodes, users, terms etc).

When you use the Entity Reference module you get a field where you can choose one ore many entities to reference. In this case it will be other users you choose (children).

This is the way it could look when you choose children in your user profile.



I suggest you read up on the Module Monday blog post by Jeff Eaton about Entity Reference. to get up to speed on relationships.