drupal_block_denied
- Versions
- 7
drupal_block_denied($ip)
Handle denied users.
Parameters
$ip IP address to check. Prints a message and exits if access is denied.
Code
includes/bootstrap.inc, line 1427
<?php
function drupal_block_denied($ip) {
// Deny access to blocked IP addresses - t() is not yet available.
if (drupal_is_denied($ip)) {
header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
print 'Sorry, ' . check_plain(ip_address()) . ' has been banned.';
exit();
}
}
?>Login or register to post comments 