You are here

function restrict_ip_block_view_alter in Restrict IP 7.2

Implements hook_block_view_alter().

Usets all blocks except the main content block for users who are not whitelisted.

File

./restrict_ip.module, line 307
Holds hooks for the restrict_ip module.

Code

function restrict_ip_block_view_alter(&$vars) {
  if (!ip_restricted()) {
    if (!isset($vars['block_id']) || $vars['block_id'] != 'system-main') {
      $vars['#access'] = FALSE;
    }
  }
}