You are here

function auto_username_clean_token_values in Automatic User Names 7

Same name and namespace in other branches
  1. 5 auto_username.module \auto_username_clean_token_values()
  2. 6 auto_username.module \auto_username_clean_token_values()

Clean token values.

Parameters

$replacements: An array of token replacements that need to be "cleaned".

$data: An array of objects used to generate the replacements.

$options: An array of options used to generate the replacements.

1 string reference to 'auto_username_clean_token_values'
_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 128
Allows a user's username to be assigned based on tokens.

Code

function auto_username_clean_token_values(&$replacements, $data = array(), $options = array()) {
  module_load_include('inc', 'auto_username');
  foreach ($replacements as $token => $value) {
    $replacements[$token] = auto_username_cleanstring($value);
  }
}