For some weird reason, the profile fields in Drupal 7 are not what they used to be. However, the user profile object makes the additional profile fields accessible as array elements. For example:
$profile->field_fieldname['und'][0]['value']
is not available but it will work when rewritten like this:
$user_profile['field_fieldname']['#object']->field_fieldname['und'][0]['value'];
So I simply did the following in my code:
/*
* Create simplified variables as shortcuts for all fields.
* Use these variables for read access lateron.
*/
$firstname = $user_profile['field_first_name']['#object']
->field_first_name['und'][0]['value'];
$middlename = $user_profile['field_middle_name']['#object']
->field_middle_name['und'][0]['value'];
$surname = $user_profile['field_surname']['#object']
->field_surname['und'][0]['value'];
$image = $user_profile['field_user_picture']['#object']
->field_user_picture['und'][0]['uri'];
Just another way of getting things working, instead of calling the $user
object yet again.