Users' list view based on current logged in user taxonomy field value I'm on drupal 7, with views 3.5.

I have added to the user profile, a taxonomy field.

I want to create a view, which will get the users which that taxonomy field has the same value with the current logged in user taxonomy field value.

Is it possible?
Suppose your taxonomy field is labelled User Tag and has a machine name field_user_tag.


Create a view that lists users
Add a contextual filter for User:
User tag (field_user_tag)
Under WHEN THE FILTER VALUE IS NOT IN
THE URL Select 'Provide a Default Value' and then Select 'PHP
Code'
Insert the following snippet:

global $user;
$term= user_load($user-&gt;uid)-&gt;field_user_tag;
return $term['und'][0]['tid'];



The PHP code grabs the current user. In this context the current user object doesn't have any additional fields loaded. So we need the user_load function to get those. The we need to extract the taxonomy id from the relevant array.

This approach works, but may not be the best or most efficient.