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_TEXT
The content type
\ID_TEXT
The content ID
\?MEMBER
Viewing 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_TEXT
The content type
\ID_TEXT
The content ID
boolean
Whether 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_TEXT
The content type (null: could be multiple)
\?ID_TEXT
The content ID (null: adding)
boolean
Whether to show a header to separate the settings out
string
Prefix for field naming
\Tempcode
The 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_TEXT
The content type
\ID_TEXT
The table alias in the main query
\?MEMBER
Viewing member to check privacy against (null: current member)
string
Additional OR clause for letting the user through
\?MEMBER
Member owning the content (null: do dynamically in query via content hook). Usually pass as NULL
array
A 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_TEXT
The content type
\ID_TEXT
The content ID
\?MEMBER
Viewing member to check privacy against (null: current member)
boolean
Whether there is accessprivacy_limits_for(\ID_TEXT $content_type, \ID_TEXT $content_id, boolean $strict_all = false
) : \?array
package | content_privacy |
---|
\ID_TEXT
The content type
\ID_TEXT
The content ID
boolean
Whether to get a full list including friends even when there are over a thousand friends
\?array
A list of member IDs that have access (null: no restrictions)read_privacy_fields(string $prefix = ''
) : array
package | content_privacy |
---|
string
Prefix for field naming
array
A 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_TEXT
The content type
\?ID_TEXT
The content ID (null: adding)
\ID_TEXT
The privacy level
array
A list of usernames
boolean
Whether to send out invite notifications (only do this is it is a new content entry, rather than something obscure, like a member's photo)
boolean
Whether it saved something