2

Currently I am developing an application in Drupal 7 , and my requirement is to display User profiles(profile image,DOB,Course,Year of joining etc.,) to anonymous users . I have used profile2 module to store them in the Database. The same information I wanted to display when a visitor clicks any of the User link. But i stuck in this part.

Please assist me in solving this...!

Thanks in advance -Syam Kumar

2

Normally this is simply done within the permissions admin section (/admin/people/permissions if I remember right). Simply give anon users the permission to view profiles and those fields.

Maybe the module you are using causes the fields to be hidden. Check the permissions of that module as well.

0

If you use some custom module by your own you can always use this:

profile2_load_by_user($UID, 'MACHINE_PROFILE_NAME');

use some of preprocess function and attach that data to your view page. You can add this also in your template.php file or you can add it to any other .tpl.php template file.

I always use custom link and past user UID to it, get all fields what I need and show in custom template file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.