You are here

function user_token_list in Token 6

Same name and namespace in other branches
  1. 5 token_user.inc \user_token_list()

Implementation of hook_token_list().

File

./token_user.inc, line 19
Implementations of token module hooks for the core user module.

Code

function user_token_list($type = 'all') {
  $tokens = array();
  if ($type == 'user' || $type == 'all') {
    $tokens['user']['user'] = t("The login name of the user account.");
    $tokens['user']['user-raw'] = t("The login name of the user account.");
    $tokens['user']['uid'] = t("The unique ID of the user account.");
    $tokens['user']['mail'] = t("The email address of the user account.");
    $tokens['user'] += token_get_date_token_info(t("User's registration"), 'user-created-');
    $tokens['user'] += token_get_date_token_info(t("User's last login"), 'user-last-login-');
    $tokens['user']['date-in-tz'] = t("The current date in the user's timezone.");
    $tokens['user']['account-url'] = t("The URL of the account profile page.");
    $tokens['user']['account-edit-url'] = t("The URL of the account edit page.");
  }
  return $tokens;
}