How can I render a view on user-profile.tpl.php that includes the user name as an argument in Drupal 7? In Drupal 7, on a custom user profile page (using user-profile.tpl.php) I would like to place a view that references all nodes of a specific content type that has that user as a reference. (The user may, or may not be an author of the node.)
use views_embed_view to embed a view:

$views = views_embed_view('VIEW_NAME', 'DISPLAY_ID');
print render($views);


The DISPLAY_ID is typically 'page' or 'block' depending on the displays you have setup in views.

You can build the view with a contextual filter to get all nodes with a user reference.

If you don't need to embed the view in the middle of your user profile you can just use a block output and show that block before or after your user profile.