Show link based on role In page.tpl.php I'm displaying a link for user page. For an example: 

&lt;?php echo l(t("My offers"), 'user/' . $user-&gt;uid . '/offers'); ?&gt;


So when a user clicks on the link it goes to user/uid/offers.

Now I want to show this link only based on a role. 
Let's say we have a role "Seller" that has unique ID 5 in the database. 
How can I set

&lt;?php echo l(t("My offers"), 'user/' . $user-&gt;uid . '/offers'); ?&gt; 


to be visible only when a user has a role "Seller"?-
I've got answer from drupal.org and this is the right solution:

&lt;?php
if(isset($user-&gt;roles[5]))
{
  echo l(t("My offers"), 'user/' . $user-&gt;uid . '/offers');
}