Same name and namespace in other branches
  1. 4.6.x modules/user.module \_user_mail_text()
  2. 4.7.x modules/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_admin_settings in modules/user/user.module
user_pass_submit in modules/user/user.module

File

modules/user/user.module, line 1572
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\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);
      case 'admin_subject':
        return t('An administrator created an account for you at !site', $variables);
      case 'admin_body':
        return t("!username,\n\nA site administrator at !site has created an account for you. 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);
      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\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 may wish to change your password at !edit_uri\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\nA request to reset the password for your account has been made at !site.\n\nYou may now log in to !uri_brief 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. It expires after one day and nothing will happen if it's not used.\n\nAfter logging in, you will be redirected to !edit_uri so you can change your password.", $variables);
    }
  }
}