You are here

function tfa_basic_tfa_disabled_body in TFA Basic plugins 7

Returns text appropriate for an email when someone has disabled tfa.

Parameters

array $message: The message, must include the language.

array $params: Parameters from drupal_mail. Must include the account.

Return value

string Message body.

1 call to tfa_basic_tfa_disabled_body()
tfa_basic_mail in ./tfa_basic.module
Implements hook_mail().

File

./tfa_basic.module, line 793

Code

function tfa_basic_tfa_disabled_body($message, $params) {
  $text = t("[user:name],\n\nTwo-factor authentication has been disabled on your account.\n\nIf you did not take this action, please contact a site administrator immediately.\n\n-- @site_name team", array(
    '@site_name' => variable_get('site_name', 'Drupal'),
  ));
  return token_replace($text, array(
    'user' => $params['account'],
  ), array(
    'language' => $message['language'],
    'sanitize' => FALSE,
    'clear' => TRUE,
  ));
}