function googleanalytics_token_values in Google Analytics 6.4
Same name and namespace in other branches
- 6.3 googleanalytics.module \googleanalytics_token_values()
Implementation of hook_token_values().
File
- ./
googleanalytics.module, line 696 - Drupal Module: Google Analytics
Code
function googleanalytics_token_values($type, $object = NULL, $options = array()) {
if ($type == 'user' && !empty($object->roles)) {
$account = $object;
// Basic user account information.
$tokens['user-role-names'] = implode(',', $account->roles);
$tokens['user-role-ids'] = implode(',', array_keys($account->roles));
return $tokens;
}
}