Highlight current user in multiple user reference field on /user page I am displaying a block on all /user pages, that will show all upcoming events, and the staff that have been assigned to certain roles at that event.

For example...

Manager: Jake

Bar Staff: Mike, Fred, Jim

Sound Tech: James, Bill

What I want to achieve, is for every instance of a users name to be highlighted in that view, if they are logged in. So, go to Bills user page, and all "Bill" entries have an "active" class applied to them. Then, go to Mikes user page, and all "Mike" entries are given the "active" class etc.

Usually, I would name a template field for the view field views-view-field--field-manager.tpl.php and do a comparison with the current user page title, which is the current users name...

&lt;?php

$title = drupal_get_title();

if ($title == $output) {
  $class = "active";
} 

?&gt;

&lt;span class="&lt;?php if(isset($class)) { print $class; } ?&gt;"&gt;&lt;?php print $output; ?&gt;&lt;/span&gt;


But this is affecting the whole field, which is no good when you have multiple users referenced in the field.

Is there a way to target individual multiple results in a field with a tpl file?
This was actually much easier than I anticipated. 

Of course, by default, every user name is a link, and for the user name to be highlighted on each users page, it meant that the link could automatically be given an active class as the current page.

Problem solved.