diff options
Diffstat (limited to 'lib/class/ui.class.php')
-rw-r--r-- | lib/class/ui.class.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/class/ui.class.php b/lib/class/ui.class.php index b1a54f33..7a56d2d7 100644 --- a/lib/class/ui.class.php +++ b/lib/class/ui.class.php @@ -33,6 +33,19 @@ class UI { } /** + * access_denied + * + * Throw an error when they try to do something naughty. + */ + public static function access_denied($error = 'Access Denied') { + // Clear any buffered crap + ob_end_clean(); + header("HTTP/1.1 403 $error"); + require_once Config::get('prefix') . '/templates/show_denied.inc.php'; + exit; + } + + /** * check_ticker * * Stupid little cutesie thing to ratelimit output of long-running |