You are here

function user_external_invite_mail in User External Invite 7

Same name and namespace in other branches
  1. 7.2 user_external_invite.module \user_external_invite_mail()
  2. 1.0.x user_external_invite.module \user_external_invite_mail()

Implements hook_mail().

File

./user_external_invite.module, line 565
Invites a user to site when connecting via external protocol e.g. LDAP.

Code

function user_external_invite_mail($key, &$message, $params) {
  switch ($key) {

    // Invite email.
    case 'user_external_invite_token':
      $message['body'] = array();
      $message['body'][] = $params['body'];
      $message['subject'] = $params['subject'];
      break;
    case 'user_external_invite_sent':
      $message['body'] = array();
      $message['body'][] = $params['body'];
      $message['subject'] = $params['subject'];
      break;
    case 'user_external_invite_accepted':
      $message['body'] = array();
      $message['body'][] = $params['body'];
      $message['subject'] = $params['subject'];
      break;
    case 'user_external_invite_confirmation':
      $message['body'] = array();
      $message['body'][] = $params['body'];
      $message['subject'] = $params['subject'];
      break;
  }
}