How to access Machine name fields in PHP?
Here is a little code snippet that should load the value of field_fname into a variable called $first_name.

global $user;
// Load the user object
$user = user_load($user-&gt;uid); 

$first_name = $user-&gt;field_fname[LANGUAGE_NONE][0]['value'];