Index: user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user.module,v
retrieving revision 1.608
diff -u -p -r1.608 user.module
--- user.module	17 Apr 2006 20:48:26 -0000	1.608
+++ user.module	21 Apr 2006 03:01:45 -0000
@@ -1470,15 +1470,15 @@ function _user_mail_text($messageid, $va
       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\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://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);
+        return _user_generate_welcome_email(t("Thank you for registering at %site.", $variables), $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\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);
+        return _user_generate_welcome_email(t("A site administrator at the %site web site has created an account for you with the following log in info:", $variables), $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\nYour new %site membership also enables to you to login to other Drupal powered websites (e.g. http://www.drop.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);
+        return _user_generate_welcome_email(t("Your application for an account at %site awaits approval.  Your log in information follows, along with information about your account and the steps you should take once your once it is approved:", $variables), $variables);
       case 'pass_subject':
         return t('Replacement login information for %username at %site', $variables);
       case 'pass_body':
@@ -2077,6 +2077,15 @@ function _user_forms(&$edit, $account, $
 }
 
 /**
+ * Generate a welcome e-mail based on the type of registration.
+ */
+function _user_generate_welcome_email($middle_string, $variables) {
+  $output = t("%username,\n\n***************************************************\nPlease follow these easy instructions and save or\nprint out this e-mail for future reference.\n***************************************************\n\n", $variables);
+  $output .= $middle_string;
+  return $output . t("\n\nusername: \"%username\" (no quotes, with spaces, if any)\npassword: %password\n\nINSTANTLY LOG IN AND CHANGE YOUR PASSWORD\n===========================================\nLog in now by clicking on the following link or by copying and pasting it into your browser's address bar:\n\n%login_url\n\nIMPORTANT: The link above expires after the first time you use it. Trying to use this link to log in a second time will not work.\n\nThe link above will take you to %edit_uri.  We highly recommend changing your password here to one that you can remember.  Simply type in your new password twice into the \"Password\" fields provided on the form and then click \"Submit\" at the very bottom of the page. See the tips at the bottom of this e-mail for choosing a secure password.\n\nEDIT YOUR ACCOUNT SETTINGS\n=============================\nOther settings are available at %edit_uri that allow you to contol your identity and how you interact with our online community.  To help establish yourself, we strongly encourage you to look over these options and change them as you see fit.  You can always change them later at any time.\n\nHOW TO LOG IN LATER\n=====================\nTo log in to the site at any time in the future, visit %login_uri.  There you will type in your username and password.\n\nPlease bookmark this login page in your browser for quick reference.\n\nUSING YOUR USERNAME AND PASSWORD ON OTHER SITES\n=================================================\nOur community is powered by software called \"Drupal.\" Drupal has a feature, called \"distributed authorization,\" which lets you use your username and password for this site on other Drupal sites (if enabled; see note below).  This saves you the hassle of having to get a new username and password for every Drupal site you visit.\n\nWhen logging into other Drupal sites, your are required to add @%uri_brief to your username. So the username you use to log into other sites becomes:\n\n%username@%uri_brief\n\nIMPORTANT NOTE: In order to work, the distributed authorization feature must be enabled by both this site and the site your are trying to log into.  If you are having problems getting this feature to work, it's likely that either this site or the site you are trying to log into has this feature disabled.\n\nFORGOT YOUR USERNAME OR PASSWORD?\n===================================\nDon't panic. It's painless to get another one by visiting %login_uri and following the instructions on the \"request new password\" link.\n\nNOTE: The only way to recover from a lost password is to have a new password assigned to you.  No person, not even the person who controls the site, has the ability to look up your old password.  It is encrypted and not readable by humans.\n\nTHANKS!\n=======\nThank you for joining our community!\n\n--  %site team\n\n\nSECURE PASSWORD TIPS: Passwords should be at least 6 characters in length, contain no words you'd find in a dictionary, and be a mix of uppercase, lowercase, numbers and even punctuation marks.", $variables);
+}
+
+/**
  * Retrieve a pipe delimited string of autocomplete suggestions for existing users
  */
 function user_autocomplete($string) {
