Finding and display custom user variables I have create a series of user fields. Some of these fields reference taxonomy terms, require a mobile number or are just basic text fields. I used the below to print one of the fields (the number field) inside my page.tpl.php.

global $user;
$user = user_load($user-&gt;uid); // Make sure the user object is fully loaded
$number = $user-&gt;field_phone_number['und'][0]['value'];

if (isset($number) &amp;&amp; !empty($number)) :
print 'Cell: ' . $number;
endif;


My question is how would I go about finding the information I need to print the other fields? The potion that reads ['und'][0]['value']; in particularly is where i'm stuck. I have used devel before to find this information for node variables but I cant find similar information for custom user variables.
It's easier to have Xdebug installed so that you can add breakpoints, pause execution and inspect surrounding variables. Alternatively, you can use Kint to print out variables.