Function __global->check_privacy

Definitions

sources/content_privacy.php

  • Check to see if some content may be viewed. Exit with an access denied if not.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$content_type ID_TEXT No No required parameter N/A N/A The content type
$content_id ID_TEXT No No required parameter N/A N/A The content ID
$viewing_member_id ?MEMBER No No Null N/A N/A Viewing member to check privacy against (null: current member)

Preview

Code (PHP)

/**
 * Check to see if some content may be viewed. Exit with an access denied if not.
 *
 * @param  ID_TEXT $content_type The content type
 * @param  ID_TEXT $content_id The content ID
 * @param  ?MEMBER $viewing_member_id Viewing member to check privacy against (null: current member)
 */

function check_privacy(string $content_type, string $content_id, ?int $viewing_member_id = null)