Function __global->member_has_historic_comcode_admin_privileges

Definitions

sources/site2.php

  • Find if a member had Comcode admin privileges before a point in time, for avoiding case of lost privileges causing a de-cached page to break.Assumes it is okay to retroactively apply permissions to content from before they did, as you wouldn't have left dangerous content around or given a member privileges after they posted it.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$member_id MEMBER No No required parameter N/A N/A The member ID
$timestamp_of_content TIME No No required parameter N/A N/A Timestamp of content to check point in time for

Returns

  • Whether they did
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find if a member had Comcode admin privileges before a point in time, for avoiding case of lost privileges causing a de-cached page to break.Assumes it is okay to retroactively apply permissions to content from before they did, as you wouldn't have left dangerous content around or given a member privileges after they posted it.
 *
 * @param  MEMBER $member_id The member ID
 * @param  TIME $timestamp_of_content Timestamp of content to check point in time for
 * @return boolean Whether they did
 */

function member_has_historic_comcode_admin_privileges(int $member_id, int $timestamp_of_content) : bool