Index: modules/user/user.module =================================================================== RCS file: /cvs/drupal/drupal/modules/user/user.module,v retrieving revision 1.1188 diff -u -r1.1188 user.module --- modules/user/user.module 30 Jul 2010 02:47:28 -0000 1.1188 +++ modules/user/user.module 2 Aug 2010 11:15:32 -0000 @@ -574,7 +574,7 @@ * Verify the syntax of the given name. */ function user_validate_name($name) { - if (!$name) { + if (strlen(trim($name)) == 0) { return t('You must enter a username.'); } if (substr($name, 0, 1) == ' ') { @@ -973,6 +973,7 @@ '#default_value' => (!$register ? $account->name : ''), '#access' => ($register || ($user->uid == $account->uid && user_access('change own username')) || $admin), '#weight' => -10, + '#validated' => TRUE, // This is so user_validate_name() can handle the 'required' validation. ); $form['account']['mail'] = array( Index: includes/install.core.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/install.core.inc,v retrieving revision 1.26 diff -u -r1.26 install.core.inc --- includes/install.core.inc 30 Jul 2010 01:59:14 -0000 1.26 +++ includes/install.core.inc 2 Aug 2010 11:15:33 -0000 @@ -1638,6 +1638,7 @@ '#required' => TRUE, '#weight' => -10, '#attributes' => array('class' => array('username')), + '#validated' => TRUE, // This is so user_validate_name() can handle the 'required' validation. ); $form['admin_account']['account']['mail'] = array('#type' => 'textfield',