Index: user.module
===================================================================
--- user.module	(revision 1587)
+++ user.module	(working copy)
@@ -400,8 +400,7 @@
 }
 
 function user_validate_mail($mail) {
-  if (!$mail) return t('You must enter an e-mail address.');
-  if (!valid_email_address($mail)) {
+  if ($mail && !valid_email_address($mail)) {
     return t('The e-mail address %mail is not valid.', array('%mail' => $mail));
   }
 }
@@ -1561,7 +1560,7 @@
   if ($error = user_validate_mail($edit['mail'])) {
     form_set_error('mail', $error);
   }
-  else if (db_result(db_query("SELECT COUNT(*) FROM {users} WHERE uid != %d AND LOWER(mail) = LOWER('%s')", $uid, $edit['mail'])) > 0) {
+  else if ($edit['mail'] && 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'))));
   }
   else if (drupal_is_denied('mail', $edit['mail'])) {
