You are here

function advuser_token_values in Advanced User 6.3

Implementation of hook_token_values().

File

./advuser.module, line 852
Advanced user module allows you to select users based on an advanced set of filtering and apply actions to block, unblock, delete or email the selected users.

Code

function advuser_token_values($type, $object = NULL, $options = array()) {
  if ($type == 'user') {
    $user = $object;
    $tokens = array();
    $tokens['advuser-status'] = $user->status ? t('Active') : t('Blocked');
    $tokens['advuser-theme'] = empty($user->theme) ? t('DEFAULT') : $user->theme;
    $tokens['advuser-created'] = strftime('%x %X', $user->created);
    $tokens['advuser-language'] = empty($user->language) ? t('DEFAULT') : $user->language;
    $tokens['advuser-timezone'] = empty($user->timezone) ? '0' : "{$user->timezone}";
    $tokens['advuser-signature'] = check_plain($user->signature);
    $tokens['advuser-signature-raw'] = $user->signature;
    return $tokens;
  }
}