check_privacy
delete_privacy_form_fields
get_privacy_form_fields
get_privacy_where_clause
has_privacy_access
privacy_limits_for
read_privacy_fields
save_privacy_form_fields
check_privacy(\ID_TEXT $content_type, \ID_TEXT $content_id, \?MEMBER $viewing_member_id = null)
| package | content_privacy |
|---|
\ID_TEXTThe content type
\ID_TEXTThe content ID
\?MEMBERViewing member to check privacy against (null: current member)
delete_privacy_form_fields(\ID_TEXT $content_type, \ID_TEXT $content_id) : boolean
| package | content_privacy |
|---|
\ID_TEXTThe content type
\ID_TEXTThe content ID
booleanWhether it deleted somethingget_privacy_form_fields(\?ID_TEXT $content_type, \?ID_TEXT $content_id= null, boolean $show_header= true, string $prefix= '') : \Tempcode
| package | content_privacy |
|---|
\?ID_TEXTThe content type (null: could be multiple)
\?ID_TEXTThe content ID (null: adding)
booleanWhether to show a header to separate the settings out
stringPrefix for field naming
\TempcodeThe form fieldsget_privacy_where_clause(\ID_TEXT $content_type, \ID_TEXT $table_alias, \?MEMBER $viewing_member_id= null, string $additional_or= '', \?MEMBER $submitter= null) : array
| package | content_privacy |
|---|
\ID_TEXTThe content type
\ID_TEXTThe table alias in the main query
\?MEMBERViewing member to check privacy against (null: current member)
stringAdditional OR clause for letting the user through
\?MEMBERMember owning the content (null: do dynamically in query via content hook). Usually pass as NULL
arrayA tuple: extra JOIN clause, extra WHERE clause, table clause (rarely used), direct table WHERE clause (rarely used)has_privacy_access(\ID_TEXT $content_type, \ID_TEXT $content_id, \?MEMBER $viewing_member_id = null) : boolean
| package | content_privacy |
|---|
\ID_TEXTThe content type
\ID_TEXTThe content ID
\?MEMBERViewing member to check privacy against (null: current member)
booleanWhether there is accessprivacy_limits_for(\ID_TEXT $content_type, \ID_TEXT $content_id, boolean $strict_all = false) : \?array
| package | content_privacy |
|---|
\ID_TEXTThe content type
\ID_TEXTThe content ID
booleanWhether to get a full list including friends even when there are over a thousand friends
\?arrayA list of member IDs that have access (null: no restrictions)read_privacy_fields(string $prefix = '') : array
| package | content_privacy |
|---|
stringPrefix for field naming
arrayA pair: the privacy level, the list of usernamessave_privacy_form_fields(\ID_TEXT $content_type, \?ID_TEXT $content_id, \ID_TEXT $privacy_level, array $additional_access, boolean $send_invites = true) : boolean
| package | content_privacy |
|---|---|
| set | members friends staff guests |
\ID_TEXTThe content type
\?ID_TEXTThe content ID (null: adding)
\ID_TEXTThe privacy level
arrayA list of usernames
booleanWhether to send out invite notifications (only do this is it is a new content entry, rather than something obscure, like a member's photo)
booleanWhether it saved something