Don't forget to check if $user->roles is an array. There are times where it isn't and you'll end up with a log full of errors from this.
Instead, try something like:
if (is_array($user->roles) && in_array('certain_roles', $user->roles)): print $account->profile_private_field_here; endif;
I decided that I wanted to create (copy the G&G) a custom profile theme to use on our website. I have followed the instructions laid out in the Mustard Seed video Podcast and have made some excellent progress.
But here is my problem, we have a few fields that are private contact info fields. Fields that only our admins are supposed to see. (phone numbers, how the heard about us ect.)
However, when I theme the user profile, using the
<?phpprint $account->profile_private_field_here
?>
Is there a way to use an if/else statement that would only print this section when users with a certain roles are logged in and not for the general public?
Thanks Guys
Jason