Display members with same taxonomy using Views Users have a &quot;school&quot; term reference field. When user visits his own user page, I want him to see his classmates listed.
For example, imagine that I have 3 students from the same school. When student A id:4 visits user/4, I want all student B and student C listed.
I can do this on term's page, term/10, but I could not figure out how to do it on user's page.
I believe it would have to be configured through contextual filter but I could not find a way yet.
Any help will be greatly appreciated!!
Create a view block of users and show all the required fields.

Add a contextual filter for school.

Now here ideally we need some way to dynamically get the school id
of the current logged in user. But we only get these kinds of values:

So in order to dynamically get the term id of the user's field. we can either write a custom hook hook_views_pre_view See its documentation and modify the correct $arg by loading the current user and getting the user's selected term for school.
or

Create a custom views argument plugin, or use this module : https://www.drupal.org/project/user_field_value