You are here

function _hosting_client_mail_text in Hosting 6.2

Same name and namespace in other branches
  1. 5 client/hosting_client.module \_hosting_client_mail_text()
  2. 7.4 client/hosting_client.module \_hosting_client_mail_text()
  3. 7.3 client/hosting_client.module \_hosting_client_mail_text()

Expand the client registration email message based on the variables

This will check for a custom message set in the hosting_client_mail_welcome_subject and hosting_client_mail_welcome_body variables.

2 calls to _hosting_client_mail_text()
hosting_client_configure in client/hosting_client.module
Menu callback for the module's settings.
hosting_client_mail in client/hosting_client.module
Implementation of hook_mail().

File

client/hosting_client.module, line 813

Code

function _hosting_client_mail_text($messageid, $variables = array()) {

  // Check if an admin setting overrides the default string.
  if ($admin_setting = variable_get('hosting_client_mail_' . $messageid, FALSE)) {
    return strtr($admin_setting, $variables);
  }
  switch ($messageid) {
    case 'welcome_subject':
      return t('Account details for !username at !site', $variables);
    case 'welcome_body':
      return t("!username,\n\nThank you for registering at !site. You may now log in to !login_uri using the following username and password:\n\nusername: !username\npassword: !password\n\nYou may also log in by clicking on this link or copying and pasting it in your browser:\n\n!login_url\n\nThis is a one-time login, so it can be used only once.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.\n\n\n--  !site team", $variables);
  }
}