In Drupal 7, I am using Profile2 (7.x-1.0-beta1) module to add custom fields like 'Author Name' etc to an user's profile page. How do I pull those custom fields in a view (7.x-3.x-dev)? All other custom CCK fields shows up in a view's selection list but not those added to an user profile page.
I fail to understand why anyone would use Profile2 (or Content profile) when users in Drupal 7 are fieldable.
From what I understand from the Profile 2 project page, it utilizes Entity API; you may need to use EntityFieldQuery Views Backend.
<?php global $user; $uid = user_load($user->uid); $profile = profile2_load_by_user($uid, 'showmember_profile'); //laod specific fields from the profile2 showmember echo $profile->field_firstname['und']['value']; echo $profile->field_lastname['und']['value']; echo $profile->field_cityname['und']['value']; echo $profile->field_phone['und']['value']; ?>