Closed (fixed)
Project:
Profile Privacy
Version:
6.x-1.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Oct 2008 at 23:57 UTC
Updated:
14 Nov 2008 at 16:42 UTC
In my user-profile.tpl.php file I'm not using the $content variable, but instead printing each profile variable individually like so:
<?php if ($account->profile_phone_number != '') { ?>
<dt>Phone number</dt><dd><?php print t('%phone', array('%phone' => $account->profile_phone_number)); ?></dd>
<?php } ?>
I'm guessing because the php is only asking if the field is also private before it prints?
Is this the case, how would I add check to see if it's private?
Thanks!!
Comments
Comment #1
quicksketchProfile Privacy actually takes a somewhat odd approach in preventing profile module from printing certain data. Because there's no check in profile module to check for privacy, Profile Privacy actually *deletes* any private data before profile module renders the fields. Profile module then just assumes the user didn't enter a value and doesn't print anything.
So for your theming, you shouldn't need to do any additional work since any private fields will be removed entirely already. You can also check $account->private_[name_of_field] though, which will be set to TRUE if that particular field has been marked private.
Comment #2
quicksketchAlso... in your testing you might notice that all the fields always seem to be showing up. If you have "administer users" privilege (user #1 will always have this permission), no data will be hidden.
Comment #3
unxposed commentedAhhhh, #2 was the issue : ) silly me!
Good to know how it all works though, thanks for taking the time to respond!
Comment #4
quicksketchComment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.