Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
You shouldn't need to be calling the API directly. Ensure the field is set to display on profile then enable privacy controls on the field or configure profile privacy to protect the field. Then when substituted as follows it should respect privacy.As you sugested I use getField with 'html' output to test if field is privat or connections.
To check profile privacy I use: CBPrivacy::checkProfileDisplayAccess ( $cbUserTable )
I couldn't get to work:
a. CBPrivacy::checkProfileDisplayAccess with field parameter
b. CBPrivacy::checkFieldDisplayAccess -
both return false only if whole user profile was privat not a field only
Fixed in latest build. Thank you for letting us know. Didn't catch it as it's being used internally with a field object.I have noticed a bug in CBPrivacy.php
checkFieldDisplayAccess can not be called with $field as an integer. If you try to do that you get an error:
Call to a member function get() on integer - /components/com_comprofiler/plugin/libraries/CB/Plugin/Privacy/CBPrivacy.php:653
Integer is converted further in the code but line 653 blocks it.
Please Log in or Create an account to join the conversation.