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']; ?>
Check for user permissions for the particular role that the user belongs to. check if that role has permissions to view the profile of itself and any other user. To check that go to People >> Permissions section.
protected by kiamlaluno♦ Oct 2 '13 at 19:01
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?