Display (and pass) a custom user field in php
You need to load the user object up fully with user_load(), so the fields get attached:

$account = user_load($GLOBALS['user']-&gt;uid);


Then use field_get_items() to extract the field data:

if ($items = field_get_items('user', $account, 'field_company_name')) {
  $company_name = $items[0]['value'];
}