Same name and namespace in other branches
  1. 4.7.x modules/user.module \_user_mail_text()
  2. 5.x modules/user/user.module \_user_mail_text()
  3. 6.x modules/user/user.module \_user_mail_text()
  4. 7.x modules/user/user.module \_user_mail_text()
2 calls to _user_mail_text()
user_configure_settings in modules/user.module
user_pass in modules/user.module

File

modules/user.module, line 1271
Enables the user registration and login system.

Code

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

  // Check if an admin setting overrides the default string.
  if ($admin_setting = variable_get('user_mail_' . $messageid, FALSE)) {
    return strtr($admin_setting, $variables);
  }
  else {
    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\nAfter logging in, you may wish to change your password at %edit_uri\n\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://www.drupal.org/) without registering. Just use the following Drupal ID and password:\n\nDrupal ID: %username@%uri_brief\npassword: %password\n\n\n--  %site team", $variables);
      case 'approval_subject':
        return t('Account details for %username at %site (pending admin approval)', $variables);
      case 'approval_body':
        return t("%username,\n\nThank you for registering at %site. Your application for an account is currently pending approval. Once it has been granted, you may log in to %login_uri using the following username and password:\n\nusername: %username\npassword: %password\n\nAfter logging in, you may wish to change your password at %edit_uri\n\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://www.drupal.org/) without registering. Just use the following Drupal ID and password:\n\nDrupal ID: %username@%uri_brief\npassword: %password\n\n\n--  %site team", $variables);
      case 'pass_subject':
        return t('Replacement login information for %username at %site', $variables);
      case 'pass_body':
        return t("%username,\n\nHere is your new password for %site. You may now login to %login_uri using the following username and password:\n\nusername: %username\npassword: %password\n\nAfter logging in, you may wish to change your password at %edit_uri", $variables);
    }
  }
}