View: show title of field where user is entity-referenced
So you can print the user reference fields, but that will show all users and their roles, and you only want to show the one?

This might seem a little hacky, but it should work.


First of all, add all three user reference fields, and add them to the same table cell using the views table settings.
Next, you need to hide the user reference fields that do not contain the current logged in users name. To do this, we will be overriding the fields with a tpl.php template. In your view, click on "advanced" and at the bottom, click on "theme: information". In the relevant row, you will find something like views-view-field--course--professor.tpl.php. Note that this is overriding the field, and has the view name type in it (which will not override any other views with the same field).
In your FTP, go to the views module folder. Click on the "theme" folder, and find the file views-view-field.tpl.php. Copy this file to your themes template folder, and rename it views-view-field--course--professor.tpl.php, or whatever your field name was in step 2. Then flush your cache. This should now be overriding that field in the view. (To make sure, you could edit that file, and add some text below the &lt;?php print $output; ?&gt; to see if it worked.)
Now that we are overriding the field, we can influence what will be shown in that field. I would replace &lt;?php print $output; ?&gt; with the following....




&lt;?php 
global $user; 
$username = $user-&gt;name;

if (strpos($output, $username) !== false) {     
  print $output; 
} 
?&gt;


I haven't tested the above, but something similar to that should print the fields output, only if the current logged in users username matches the output.