function twilio_verify_duplicate_number in Twilio 7
Checks if a given phone number already exists in the database.
@result boolean TRUE if it exists, FALSE otherwise
Parameters
string $number: The sender's mobile number.
1 call to twilio_verify_duplicate_number()
- twilio_user_settings_add_form_validate in ./
twilio.pages.inc - Validation function for user settings form.
File
- ./
twilio.module, line 477 - Twilio module
Code
function twilio_verify_duplicate_number($number) {
$result = db_select('twilio_user', 't')
->fields('t')
->condition('t.number', $number)
->execute()
->fetchAssoc();
if ($result['number'] == $number) {
return TRUE;
}
return FALSE;
}