You are here

function auto_username_get_placeholders in Automatic User Names 6

Same name and namespace in other branches
  1. 5 auto_username.module \auto_username_get_placeholders()

Get the placeholders to use for string translation.

This function is largely stolen from pathauto.

Parameters

$type:

$object:

1 call to auto_username_get_placeholders()
_auto_username_patternprocessor in ./auto_username.module
Process an account and return its new username according to the current pattern.

File

./auto_username.module, line 212

Code

function auto_username_get_placeholders($type, $object) {
  $full = token_get_values($type, $object, TRUE);
  $tokens = token_prepare_tokens($full->tokens);
  $values = auto_username_clean_token_values($full);
  return array(
    'tokens' => $tokens,
    'values' => $values,
  );
}