function multiple_email_find_address in Multiple E-mail Addresses 7
Same name and namespace in other branches
- 5 multiple_email.module \multiple_email_find_address()
- 6 multiple_email.module \multiple_email_find_address()
- 2.x multiple_email.module \multiple_email_find_address()
Finds the specified e-mail and returns an object containing its data. Returns false if e-mail cannot be found.
Parameters
string $email:
Return value
mixed
7 calls to multiple_email_find_address()
- MultipleEmailAdminUserTestCase::testMultipleEmailsAdminUser in ./
multiple_email.test - Test that the Multiple E-mails user can add a new e-mail address.
- MultipleEmailLateInstallTestCase::testMultipleEmailsLateInstallModule in ./
multiple_email.test - Test that the Multiple E-mails user can add a new e-mail address.
- multiple_email_edit_form_validate in ./
multiple_email_edit_page.inc - Validates multiple_email_edit_form
- multiple_email_manage_validate in ./
multiple_email_manage.inc - Handle validation of multiple_email_manage_form.
- multiple_email_user_update in ./
multiple_email.module - Implements hook_user_update().
File
- ./
multiple_email.module, line 487 - multiple_email module file
Code
function multiple_email_find_address($email) {
$email = trim($email);
$query = db_select('multiple_email', 'me');
$query
->addField('me', 'eid');
$query
->condition('me.email', db_like($email), 'LIKE');
$result = $query
->execute();
$eid = $result
->fetchField();
if ($eid) {
return multiple_email_load($eid);
}
return FALSE;
}