You are here

function mailing_list_email_get_by_email in Mailing List 7

Return the mailing list e-mail object matching an email and a mailing list

Parameters

$mlid: The ID of the mailing list to get records for.

$mail: Email to look for.

Return value

The mailing list e-mail object, if exists, FALSE otherwise.

2 calls to mailing_list_email_get_by_email()
mailing_list_import_form_submit in ./mailing_list.admin.inc
Submit handler for the mailing list import form.
mailing_list_subscription_form_validate in ./mailing_list.module
Validation handler for the subscription form; checks name and e-mail entered.

File

./mailing_list.module, line 334
Minimalistic mailing list module.

Code

function mailing_list_email_get_by_email($mlid, $mail) {
  return db_select('mailing_list_emails', 'mle')
    ->fields('mle')
    ->condition('mlid', $mlid)
    ->condition('mail', $mail)
    ->execute()
    ->fetchAllAssoc('eid');
}