function drupal_block_denied

Handles denied users.

Parameters

$ip: IP address to check. Prints a message and exits if access is denied.

1 call to drupal_block_denied()
_drupal_bootstrap_page_cache in includes/bootstrap.inc
Attempts to serve a page from the cache.

File

includes/bootstrap.inc, line 2270

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;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.