Print custom user fields
You are using the global variable $user which represents the logged-in user.


  An object representing the user currently visiting the site.
  
  Contains preferences and other account information for logged-in
  users. When a user is not logged-in, the $user->uid property is set to
  0.


You could use the user id from the URL on the user profile page by calling arg(1).
Here is the possible fix for your code:

&lt;?php
 $uid = arg(1);

 $user_fields = user_load($uid);

 $customfield = $user_fields-&gt;field_navnn['und']['0']['value'];

 print  t("Custom field value is " . $customfield. ' ') ; 
?&gt;


I do not concern with your user profile template. This is just for your code fix.