You are here

function access_access_grant_view in Access Control Kit 7

Implements hook_access_grant_view().

File

./access.access.inc, line 205
Access control kit API hook implementations to integrate with core modules.

Code

function access_access_grant_view($grant) {
  $account = user_load($grant->uid);
  $grant->content['user'] = array(
    '#type' => 'item',
    '#title' => t('User:'),
    '#markup' => theme('username', array(
      'account' => $account,
    )),
    '#weight' => -5,
  );
  $role = user_role_load($grant->rid);
  $grant->content['role'] = array(
    '#type' => 'item',
    '#title' => t('Role:'),
    '#markup' => check_plain($role->name),
    '#weight' => -4,
  );
}