function tfa_basic_get_twilio_client in TFA Basic plugins 7
Get a Twilio services client.
Return value
Services_Twilio|FALSE
3 calls to tfa_basic_get_twilio_client()
- tfa_basic_setup_form_submit in ./
tfa_basic.pages.inc - Setup form submit.
- tfa_basic_sms_create in ./
tfa_basic.module - Create TfaBasicSms plugin.
- _tfa_basic_plugin_setup_form_overview in ./
tfa_basic.pages.inc - Get TFA basic setup action links for use on overview page.
File
- ./
tfa_basic.module, line 234
Code
function tfa_basic_get_twilio_client() {
if (module_exists('libraries') && ($library = libraries_load('twilio') && !empty($library['loaded']))) {
// Library should be loaded.
}
if (!class_exists('Services_Twilio')) {
return FALSE;
}
$sid = variable_get('tfa_basic_twilio_account_sid', '');
$token = variable_get('tfa_basic_twilio_account_token', '');
return new Services_Twilio($sid, $token);
}