Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.954
diff -u -p -r1.954 user.module
--- modules/user/user.module	13 Jan 2009 06:27:01 -0000	1.954
+++ modules/user/user.module	20 Jan 2009 18:49:09 -0000
@@ -703,12 +703,18 @@ function user_user_validate(&$edit, &$ac
       }
     }
 
-    // Validate the e-mail address:
+    // Validate the e-mail address, and check if it is taken by an existing user.
     if ($error = user_validate_mail($edit['mail'])) {
       form_set_error('mail', $error);
     }
     elseif (db_result(db_query("SELECT COUNT(*) FROM {users} WHERE uid != %d AND LOWER(mail) = LOWER('%s')", $uid, $edit['mail'])) > 0) {
-      form_set_error('mail', t('The e-mail address %email is already registered. <a href="@password">Have you forgotten your password?</a>', array('%email' => $edit['mail'], '@password' => url('user/password'))));
+      // Format error message dependent on whether the user is logged in or not.
+      if ($GLOBALS['user']->uid) {
+        form_set_error('mail', t('The e-mail address %email is already taken.', array('%email' => $edit['mail'])));
+      }
+      else {
+        form_set_error('mail', t('The e-mail address %email is already registered. <a href="@password">Have you forgotten your password?</a>', array('%email' => $edit['mail'], '@password' => url('user/password'))));
+      }
     }
   }
 }
