You are here

function _user_delete_mail_text in User Delete 6.2

Return subject and body strings for default _user_mail_notify function.

Parameters

<type> $key:

<type> $language:

<type> $variables:

Return value

<type>

1 call to _user_delete_mail_text()
user_delete_settings in ./user_delete.admin.inc
Administrative settings page

File

./user_delete.admin.inc, line 102
User delete - Administration page

Code

function _user_delete_mail_text($key, $language = NULL, $variables = array()) {
  $langcode = isset($language) ? $language->language : NULL;
  if ($admin_setting = variable_get('user_mail_' . $key, FALSE)) {

    // An admin setting overrides the default string.
    return strtr($admin_setting, $variables);
  }
  else {

    // No override, return default string.
    switch ($key) {
      case 'cancel_confirm_subject':
        return t('Account cancellation request for !username at !site', $variables, $langcode);
        break;
      case 'cancel_confirm_body':
        return t("!username,\n\nA request to cancel your account has been made at !site.\n\nYou may now cancel your account on !uri_brief by clicking this link or copying and pasting it into your browser:\n\n!cancelurl\n\nNOTE: The cancellation of your account is not reversible.\n\nThis link expires in one day and nothing will happen if it is not used.\n\n\n--  !site team", $variables, $langcode);
      case 'status_canceled_subject':
        return t('Account details for !username at !site (canceled)', $variables, $langcode);
      case 'status_canceled_body':
        return t("!username,\n\nYour account on !site has been canceled.\n\n\n--  !site team", $variables, $langcode);
        break;
    }
  }
}