Function __global->access_denied

Definitions

sources/permissions.php

  • Show a helpful access-denied page. Has a login ability if it senses that logging in could curtail the error.Note that this function should only be used for cases where access is being denied based on credentials, not for when access is blocked for other reasons (such as to enforce flow security). Using warn_exit with INTERNAL_ERROR is for those situations, or log_hack_attack_and_exit + warn_exit.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: N/A

Parameters

Name Type Default Set Range Description
$class ID_TEXT ACCESS_DENIED N/A N/A The class of error (e.g. PRIVILEGE). This is a language string codename.
$param string Blank (empty string) N/A N/A The parameter given to the error message
$force_login boolean False N/A N/A Force the user to login (even if perhaps they are logged in already)