how to compare two content type fields and filter the output by drupal views?
Seems to me that you're going to need this:

views_embed_view()  inside of the user_profile.tpl.php

more specifically:

First set up a view to return content type 1 nodes, that takes an argument of taxonomy term id.

Then, assuming you can get the content type 2 node into user_profile.tpl.php, grab the select list value like so:

&lt;?php
    $selected_value = $content_type2_node-&gt;field_selectlistname[0]['value'];
    $term_id = taxonomy_get_term_by_name($selected_value);

?&gt;


note use of taxonomy_get_term_by_name()

and use of a cck select list field named is field_selectlistname, update that to your field name.

then you can use this:

&lt;?php
   print views_embed_view("view_name","block_1",$term_id);
?&gt;


to print out your view.

Note that the first two arguments are the view name of your view, and the display id, which is going to be something like 'block_1', 'default' or 'page_1'

I'm assuming here you know how to set up the view, and know how to get that user_profile.tpl.php to work for your role.. (if isset($account->roles[ role id ])... )

good luck!