You are here

function multiple_email_find_address in Multiple E-mail Addresses 5

Same name and namespace in other branches
  1. 6 multiple_email.module \multiple_email_find_address()
  2. 7 multiple_email.module \multiple_email_find_address()
  3. 2.x multiple_email.module \multiple_email_find_address()

Finds the specified email and returns an object containing its data. Returns false if email cannot be found.

Parameters

string $email:

Return value

mixed

2 calls to multiple_email_find_address()
multiple_email_add_form_validate in ./multiple_email_add_page.inc
Validates multiple_email_add_form
multiple_email_user in ./multiple_email.module
Implementation of hook_user()

File

./multiple_email.module, line 396
multiple_email module file

Code

function multiple_email_find_address($email) {
  $result = db_query("SELECT eid FROM {multiple_email} WHERE email='%s'", $email);
  if (db_num_rows($result)) {
    $r = db_fetch_array($result);
    return multiple_email_get_address($r['eid']);
  }
  else {
    return false;
  }
}