? .cvsignore
? drbm.tmproj
? mail.patch
? nbproject
? tmp.patch
? tmp.patch.patch
? modules/node/node-admin-display-overview-form.tpl.php
? modules/node/node.build_mode.inc
? sites/all/modules
? sites/default/files
Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.960
diff -u -F^f -p -r1.960 user.module
--- modules/user/user.module	22 Jan 2009 12:46:07 -0000	1.960
+++ modules/user/user.module	23 Jan 2009 02:29:28 -0000
@@ -422,10 +422,7 @@ function user_validate_name($name) {
 }
 
 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));
   }
 }
@@ -753,7 +750,7 @@ function user_user_validate(&$edit, &$ac
     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) {
+     else if ($edit['mail'] && db_result(db_query("SELECT COUNT(*) FROM {users} WHERE uid != %d AND LOWER(mail) = LOWER('%s')", $uid, $edit['mail'])) > 0) {
       // 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'])));
