You are here

function hosting_client_view_user in Hosting 7.3

Same name and namespace in other branches
  1. 7.4 client/hosting_client.access.inc \hosting_client_view_user()

Add visible items when viewing a user().

See also

hosting_client_user()

1 call to hosting_client_view_user()
hosting_client_user_view in client/hosting_client.access.inc
Implements hook_user_view().

File

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

Code

function hosting_client_view_user($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', array(
        'header' => $header,
        'rows' => $rows,
      )),
      'class' => 'client',
    );
    return array(
      t('Clients') => $items,
    );
  }
}