function _user_mail_text

Returns a mail string for a variable name.

Parameters

string $key: The config key that provides the mail text.

string $langcode: (optional) A language code to use to generate the e-mail text.

array $variables: (optional) An array of token keys and values.

Return value

A string value containing the text for the user.mail config key.

1 call to _user_mail_text()
user_mail in drupal/core/modules/user/user.module
Implements hook_mail().

File

drupal/core/modules/user/user.module, line 2009
Enables the user registration and login system.

Code

function _user_mail_text($key, $langcode = NULL, $variables = array()) {

  // We do not sanitize the token replacement, since the output of this
  // replacement is intended for an e-mail message, not a web browser.
  return token_replace(config('user.mail')
    ->get($key), $variables, array(
    'langcode' => $langcode,
    'callback' => 'user_mail_tokens',
    'sanitize' => FALSE,
    'clear' => TRUE,
  ));
}