function twilio_register_submit in Twilio 7
Custom submit handler for phone numbers during registration.
1 string reference to 'twilio_register_submit'
- twilio_form_user_register_form_alter in ./
twilio.user.inc - Implements hook_FORMID_form_alter().
File
- ./
twilio.user.inc, line 144 - Twilio user account and registration related functionality
Code
function twilio_register_submit($form, &$form_state) {
$value = $form_state['values']['number'];
// Phone number is not required and not entered.
if (empty($value) && empty($form['account']['number']['#required'])) {
return;
}
else {
$account = user_load($form_state['values']['uid']);
twilio_user_send_confirmation($account, $form_state['values']['number'], $form_state['values']['countrycode']);
}
}