You are here

function hosting_client_user_view in Hosting 6.2

Same name and namespace in other branches
  1. 5 client/hosting_client.access.inc \hosting_client_user_view()
  2. 7.4 client/hosting_client.access.inc \hosting_client_user_view()
  3. 7.3 client/hosting_client.access.inc \hosting_client_user_view()

Add visible items when viewing a user().

See also

hosting_client_user()

1 call to hosting_client_user_view()
hosting_client_user in client/hosting_client.access.inc
Implements hook_user().

File

client/hosting_client.access.inc, line 50
Control client node access.

Code

function hosting_client_user_view($user) {
  if ($user->client_id) {
    foreach ($user->client_id as $client => $type) {
      $rows[] = array(
        _hosting_node_link($client),
      );
    }

    // this is a table because we'll have types for clients eventually
    $header = array(
      t('Hosting client'),
    );
    $items['client_list'] = array(
      'value' => theme('table', $header, $rows),
      'class' => 'client',
    );
    return array(
      t('Clients') => $items,
    );
  }
}