function tfa_get_phone_number in Two-factor Authentication (TFA) 6
Same name and namespace in other branches
- 7 tfa.module \tfa_get_phone_number()
Address callback for SMS, uses tfa_phone_field variable.
1 call to tfa_get_phone_number()
- _tfa_send_code in ./
tfa.module - Send the code using SMS Framework.
1 string reference to 'tfa_get_phone_number'
- sms_tfa_api in ./
tfa.module - Implements hook_tfa_api() on behalf of the SMS module.
File
- ./
tfa.module, line 313 - Two-factor authentication for Drupal.
Code
function tfa_get_phone_number($account) {
$phone_field = variable_get('tfa_phone_field', 'profile_phone_number');
if (empty($phone_field)) {
return FALSE;
}
if (!isset($account->{$phone_field}) || empty($account->{$phone_field})) {
return FALSE;
}
$phone_number = $account->{$phone_field};
return $phone_number;
}