You are here

function user_registrationpassword_tokens in User registration password 7

Same name and namespace in other branches
  1. 8 user_registrationpassword.tokens.inc \user_registrationpassword_tokens()

Implements hook_tokens().

File

./user_registrationpassword.tokens.inc, line 26
Token support for the user_registrationpassword module.

Code

function user_registrationpassword_tokens($type, $tokens, array $data = array(), array $options = array()) {
  $replacements = array();
  if ($type == 'user' && !empty($data['user']) && isset($tokens['registrationpassword-url'])) {
    $replacements[$tokens['registrationpassword-url']] = user_registrationpassword_confirmation_url($data['user']);
  }
  return $replacements;
}