how to show a link only on my own profile node? tried this code:

&lt;?php
global $user;
if (arg(0) == 'user' &amp;&amp; $user-&gt;uid == arg(1)){
$url = privatemsg_get_link(array(user_load($node-&gt;uid)));
print '&lt;div class="pm"&gt;'. l(t('Send a private message to the author'), $url, array('attributes' =&gt; array('class' =&gt; 'lichnoe'))) .'&lt;/div&gt;'; 
}
?&gt;


but this doesn't works. It displays on my own profile, but doesn't displays on other user's profile. What i'm doing wrong?
The code you have posted above will check if you are on the user/[uid] page for the user that is logged in. So it will take effect for the user's own user page. If you wanted to post the link on all pages except the user's own page you should instead do

if (arg(0) == 'user' &amp;&amp; is_numeric(arg(1)) &amp;&amp; $user-&gt;uid != arg(1)) {