Function __global->check_jump_to_not_validated

Definitions

sources/validation.php

  • Check if the given member has the privilege to access the given content by means of validation.This function will throw an access denied if the given member does not have the privilege.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

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 being accessed
$content_id ID_TEXT No No required parameter N/A N/A The content ID being accessed
$member_viewing MEMBER No No required parameter N/A N/A The member trying to view the content
$bypass_members array No No [] N/A N/A Array of members that should be granted access even if they don't have the privilege, such as the submitters
$ret boolean No No False N/A N/A Whether not to error with access denied and simply return a boolean instead

Returns

  • Whether we have the privilege
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Check if the given member has the privilege to access the given content by means of validation.This function will throw an access denied if the given member does not have the privilege.
 *
 * @param  ID_TEXT $content_type The content type being accessed
 * @param  ID_TEXT $content_id The content ID being accessed
 * @param  MEMBER $member_viewing The member trying to view the content
 * @param  array $bypass_members Array of members that should be granted access even if they don't have the privilege, such as the submitters
 * @param  boolean $ret Whether not to error with access denied and simply return a boolean instead
 * @return boolean Whether we have the privilege
 */

function check_jump_to_not_validated(string $content_type, string $content_id, int $member_viewing, array $bypass_members = [], bool $ret = false) : bool