By gavin_s on
I have a custom user_profile.tpl.php page which displays a list of profile fields. I now need to hide some of these fields for people who are not logged into the site. I can't control access to the fields via the profile module as the custom user_profile.tpl.php is calling them directly and seems to be overiding the profile settings.
So how would I let logged in users see the full output of the custom user_profile.tpl.php and show non-members a different user_profile.tpl.php file with the sensitive fields removed?
Thank you.
Comments
is this what you are looking
is this what you are looking for?
Looks good - where do I
Looks good - where do I specify a 'if not logged' in location?
<?phpglobal $user;if (
does that help?
Hi Mz906. Thing is, if the
Hi Mz906. Thing is, if the user is logged in I want drupal to carry on and use the user_profile.tpl.php. Otherwise, if they are not logged in I want a different user_profile.tpl.php to be used. THis code does not seem to work for this scenario after substituting the relevant files in the code.
Any ideas?
Solved
Using snippet found here http://drupal.org/node/45774 in the custom profile page. Thanks for help.