how to show a link only on my own profile node?
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)) {