You are here

multiple_email.api.php in Multiple E-mail Addresses 6

Same filename and directory in other branches
  1. 7 multiple_email.api.php
  2. 2.x multiple_email.api.php

API functions for Multiple Email module.

File

multiple_email.api.php
View source
<?php

/**
 * @file
 *  API functions for Multiple Email module.
 */

/**
 * @addtogroup hooks
 * @{
 */

/**
 * Signal that an email address has been registered by Multiple Email.
 *
 * @param $email
 *  The fully-loaded email object created by Multiple Email.
 */
function hook_multiple_email_register($email) {
  drupal_set_message(t('Do not forget to confirm %email!', array(
    '%email' => $email->mail,
  )));
}

/**
 * Signal that an email address has been confirmed by Multiple Email.
 *
 * @param $email
 *  The fully-loaded email object created by Multiple Email.
 */
function hook_multiple_email_confirm($email) {
  drupal_set_message(t('Now that %email has been confirmed, you may make it your primary address.', array(
    '%email' => $email->mail,
  )));
}

/**
 * Signal that an email address has been deleted by Multiple Email.
 *
 * When an email address is deleted by multiple email, this hook is invoked to
 * notify other modules this has happened. Addresses might also be deleted
 * in multiple_email's implementation of hook_user(), without triggering this hook.
 *
 * @param $eid
 *  Email Address ID.
 */
function hook_multiple_email_delete($eid) {
  db_query("DELETE FROM {mytable} WHERE eid = %d", $eid);
}

/**
 *@} End of "addtogroup hooks".
 */

Functions

Namesort descending Description
hook_multiple_email_confirm Signal that an email address has been confirmed by Multiple Email.
hook_multiple_email_delete Signal that an email address has been deleted by Multiple Email.
hook_multiple_email_register Signal that an email address has been registered by Multiple Email.