You are here

function hosting_site_client_list_block_visibility in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 site/hosting_site.module \hosting_site_client_list_block_visibility()
  2. 7.3 site/hosting_site.module \hosting_site_client_list_block_visibility()

Control block visibility.

File

site/hosting_site.module, line 691

Code

function hosting_site_client_list_block_visibility() {
  global $user;
  $node = menu_get_object();
  $menu_item = menu_get_item();
  if (!empty($node) && $menu_item['number_parts'] == 2) {
    return $node->type == 'client' && !user_access('administer clients', $user);
  }
  return FALSE;
}