Index: modules/user/user.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.934
diff -u -r1.934 user.module
--- modules/user/user.module	15 Nov 2008 11:45:04 -0000	1.934
+++ modules/user/user.module	17 Nov 2008 04:20:45 -0000
@@ -139,9 +139,6 @@
  *   An associative array of attributes to search for in selecting the
  *   user, such as user name or e-mail address.
  *
- * @return
- *   A fully-loaded $user object upon successful user load or FALSE if user
- *   cannot be loaded.
  */
 function user_load($array = array()) {
   // Dynamically compose a SQL query:
@@ -212,7 +209,7 @@
  *   (optional) The category for storing profile information in.
  *
  * @return
- *   A fully-loaded $user object upon successful save or FALSE if the save failed.
+ *   A fully-loaded $user object.
  */
 function user_save($account, $edit = array(), $category = 'account') {
   $table = drupal_get_schema('users');
@@ -256,11 +253,7 @@
     $edit['data'] = $data;
     $edit['uid'] = $account->uid;
     // Save changes to the users table.
-    $success = drupal_write_record('users', $edit, 'uid');
-    if (!$success) {
-      // The query failed - better to abort the save than risk further data loss.
-      return FALSE;
-    }
+    drupal_write_record('users', $edit, 'uid');
 
     // Reload user roles if provided.
     if (isset($edit['roles']) && is_array($edit['roles'])) {
@@ -308,12 +301,7 @@
       $edit['access'] = REQUEST_TIME;
     }
 
-    $success = drupal_write_record('users', $edit);
-    if (!$success) {
-      // On a failed INSERT some other existing user's uid may be returned.
-      // We must abort to avoid overwriting their account.
-      return FALSE;
-    }
+    drupal_write_record('users', $edit);
 
     // Build the initial user object.
     $user = user_load(array('uid' => $edit['uid']));
@@ -1413,11 +1401,6 @@
       'access' => REQUEST_TIME
     );
     $account = user_save('', $userinfo);
-    // Terminate if an error occured during user_save().
-    if (!$account) {
-      drupal_set_message(t("Error saving user account."), 'error');
-      return;
-    }
     user_set_authmaps($account, array("authname_$module" => $name));
     $user = $account;
     watchdog('user', 'New external user: %name using module %module.', array('%name' => $name, '%module' => $module), WATCHDOG_NOTICE, l(t('edit'), 'user/' . $user->uid . '/edit'));
@@ -2287,12 +2270,6 @@
     $merge_data['status'] = variable_get('user_register', 1) == 1;
   }
   $account = user_save('', array_merge($form_state['values'], $merge_data));
-  // Terminate if an error occured during user_save().
-  if (!$account) {
-    drupal_set_message(t("Error saving user account."), 'error');
-    $form_state['redirect'] = '';
-    return;
-  }
   $form_state['user'] = $account;
 
   watchdog('user', 'New user: %name (%email).', array('%name' => $name, '%email' => $mail), WATCHDOG_NOTICE, l(t('edit'), 'user/' . $account->uid . '/edit'));
