On this page
function drupal_block_denied
drupal_block_denied($ip)
Handles denied users.
Parameters
$ip: IP address to check. Prints a message and exits if access is denied.
File
- includes/bootstrap.inc, line 2189
- Functions that need to be loaded on every Drupal request.
Code
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();
}
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!bootstrap.inc/function/drupal_block_denied/7.x