You are here

function _tfa_send_code in Two-factor Authentication (TFA) 7

Same name and namespace in other branches
  1. 6 tfa.module \_tfa_send_code()

Send the code using SMS Framework.

2 string references to '_tfa_send_code'
hook_tfa_api in ./tfa.api.php
Define TFA communication channel and address storage.
sms_tfa_api in ./tfa.module
Implements hook_tfa_api() on behalf of the SMS module.

File

./tfa.module, line 336
Two-factor authentication for Drupal.

Code

function _tfa_send_code($account, $code, $message = '') {
  $phone_number = tfa_get_phone_number($account);
  $message = $message . ' ' . $code;
  return sms_send($phone_number, $message);
}