Function __global->cns_has_special_pt_access

Definitions

sources/cns_topics.php

  • Find whether a member has special access to a certain PT.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$topic_id AUTO_LINK No No required parameter N/A N/A The ID of the topic
$member_id ?MEMBER No No Null N/A N/A The member (null: current member)

Returns

  • Whether they have special access
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find whether a member has special access to a certain PT.
 *
 * @param  AUTO_LINK $topic_id The ID of the topic
 * @param  ?MEMBER $member_id The member (null: current member)
 * @return boolean Whether they have special access
 */

function cns_has_special_pt_access(int $topic_id, ?int $member_id = null) : bool