You are here

function email_tfa_send in Two-factor Authentication (TFA) 7

Send method for Email TFA.

1 string reference to 'email_tfa_send'
email_tfa_tfa_api in ./tfa.api.php
Implements hook_tfa_api().

File

./tfa.api.php, line 73
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function email_tfa_send($account, $code, $message) {
  $params = array(
    'code' => $code,
    'message' => $message,
  );
  $from = variable_get('site_mail', 'admin@example.com');
  $result = drupal_mail('email_tfa', 'tfa_send', $account->mail, user_preferred_language($account), $params, $from, TRUE);
  return $result['result'];
}