You are here

function email_confirm_mail_text in Email Change Confirmation 6

Same name and namespace in other branches
  1. 7 email_confirm.module \email_confirm_mail_text()

Returns an email subject or body string.

Used by email_confirm_build_mail() and the settings forms to retrieve strings.

2 calls to email_confirm_mail_text()
email_confirm_admin_settings in ./email_confirm.module
Implementation of hook_settings().
email_confirm_build_mail in ./email_confirm.module
Build and send out the confirmation email to the user's current and proposed new email address.

File

./email_confirm.module, line 272

Code

function email_confirm_mail_text($key, $language = NULL, $variables = array()) {
  $langcode = isset($language) ? $language->language : NULL;
  if ($default_text = variable_get($key, FALSE)) {
    return strtr($default_text, $variables);
  }
  else {
    switch ($key) {
      case 'email_confirm_confirmation_email_subject':
      case 'user_change_mail_subject':

      // Mail Edit integration
      case 'user_change_mail_original_subject':

        // Mail Edit integration
        return t('Email address change request for !username at !site', $variables, $langcode);
        break;
      case 'email_confirm_confirmation_email_body':
      case 'user_change_mail_body':

        // Mail Edit integration
        return t('Hello !username,

A request to change your email address has been made at !site.
You need to verify the change by clicking on the link below or by
copying and pasting it in your browser:

!email_url

This is a one-time URL - it can be used only once. It expires after
24 hours. If you do not click the link to confirm, your email address
at !site will not be updated.
', $variables, $langcode);
        break;
      case 'email_confirm_confirmation_original_email_body':
      case 'user_change_mail_original_body':

        // Mail Edit integration
        return t('Hello !username,

A request to change your email address has been made at !site.
In order to confirm the update of your email address you will
need to follow the instructions sent to your new email address
within 24 hours.
', $variables, $langcode);
        break;
    }
  }
}