You are here

function cas_attributes_token_info_alter in CAS Attributes 7

Same name and namespace in other branches
  1. 8 cas_attributes.tokens.inc \cas_attributes_token_info_alter()
  2. 2.x cas_attributes.tokens.inc \cas_attributes_token_info_alter()

Implements hook_token_info_alter().

File

./cas_attributes.tokens.inc, line 11
Token module integration.

Code

function cas_attributes_token_info_alter(&$data) {
  if (function_exists('cas_phpcas_attributes')) {
    $data['tokens']['cas']['attribute'] = array(
      'name' => t('Attribute'),
      'description' => t('A CAS attribute of the user. (Only available if user is logged into CAS). Always stored as an array token (thus supporting multivalue attributes); therefore be sure to remember to specify which array member you want (for instance, to get the first value: [cas:attribute:?:first]).  <a href="@url">Available tokens</a>.', array(
        '@url' => url('admin/config/people/cas/attributes/cas'),
      )),
      'dynamic' => TRUE,
    );
  }
}