You are here

function multiple_email_get_address in Multiple E-mail Addresses 5

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

Loads a single address from the email registry and returns it as an object.

Parameters

integer $eid:

Return value

object

12 calls to multiple_email_get_address()
multiple_email_add_form_submit in ./multiple_email_add_page.inc
Processes form submission of multiple_email_add_form
multiple_email_confirm_form_submit in ./multiple_email_confirm_page.inc
Process multiple_email_confirm_form submission
multiple_email_confirm_page in ./multiple_email_confirm_page.inc
Renders the page to confirm an email address
multiple_email_delete_form_submit in ./multiple_email_delete_page.inc
Processes mulitple_email_delete_form_submit
multiple_email_delete_form_validate in ./multiple_email_delete_page.inc
Validates multiple_email_delete_form

... See full list

File

./multiple_email.module, line 365
multiple_email module file

Code

function multiple_email_get_address($eid) {
  $result = db_query("\n    SELECT\n      a.eid,\n      a.uid,\n      a.email,\n      a.time_registered,\n      a.time_registered,\n      a.confirmed,\n      a.confirm_code,\n      a.time_code_generated,\n      a.attempts,\n      IF(a.email = u.mail, 1, 0) AS primary_address\n    FROM\n      {multiple_email} a\n    INNER JOIN {users} u ON (u.uid = a.uid)\n    WHERE\n      a.eid = %d", $eid);
  return db_fetch_object($result);
}