function twilio_user_settings_confirm_form_validate in Twilio 7
Validation handler for user settings confirmation form.
@todo Please document this function.
See also
1 string reference to 'twilio_user_settings_confirm_form_validate'
- twilio_user_settings_form in ./
twilio.pages.inc - User settings form.
File
- ./
twilio.pages.inc, line 160 - User facing pages
Code
function twilio_user_settings_confirm_form_validate($form, &$form_state) {
if ($form_state['clicked_button']['#value'] == t('Confirm number')) {
$account = user_load($form_state['values']['uid']);
if ($form_state['values']['confirm_code'] != $account->twilio_user['code']) {
form_set_error('confirm_code', t('The confirmation code is invalid.'));
}
}
}