You are here

function multiple_email_confirm_email in Multiple E-mail Addresses 7

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

Marks an e-mail address as confirmed in the e-mail registry

Parameters

object $email E-mail row object to confirm:

bool $confirm Defaults to TRUE:

Return value

void

4 calls to multiple_email_confirm_email()
multiple_email_confirm_form_submit in ./multiple_email_confirm_page.inc
Process multiple_email_confirm_form submission.
multiple_email_edit_form_submit in ./multiple_email_edit_page.inc
Processes form submission of multiple_email_edit_form
multiple_email_manage_submit in ./multiple_email_manage.inc
Handle submission of multiple_email_manage_form.
multiple_email_primary_form_submit in ./multiple_email_primary_page.inc
Processes multiple_email_primary_form submission

File

./multiple_email.module, line 555
multiple_email module file

Code

function multiple_email_confirm_email($email, $confirm = TRUE) {
  $confirm = $confirm ? 1 : 0;
  watchdog('Multiple E-mail', 'Marking address %email confirmed for user !uid', array(
    '%email' => $email->email,
    '!uid' => $email->uid,
  ), WATCHDOG_NOTICE, l(t('edit'), "user/{$email->uid}"));
  $query = db_update('multiple_email')
    ->fields(array(
    'confirmed' => $confirm,
  ))
    ->condition('eid', $email->eid)
    ->execute();
  $email->confirmed = $confirm;

  // Fires off hook_multiple_email_confirm().
  module_invoke_all('multiple_email_confirm', $email);
}