--- plugins/FeedsUserProcessor.inc	2010-09-07 13:29:36.000000000 -0400
+++ /var/www/amadc/drupal/sites/all/modules/feeds/plugins/FeedsUserProcessor.inc	2011-04-07 10:36:24.000000000 -0400
@@ -35,6 +35,14 @@ class FeedsUserProcessor extends FeedsPr
         // Add term id if available.
         if (!empty($uid)) {
           $account->uid = $uid;
+          
+          if ($this->config['preserve_roles']) {
+            // Merge existing roles into new roles specified by importer configuration
+            $existing_account = user_load($uid);
+            foreach ($existing_account->roles as $rid => $role) {
+              $account->roles[$rid] = $rid;
+            }
+          }
         }
 
         // Save the user.
@@ -113,6 +121,7 @@ class FeedsUserProcessor extends FeedsPr
       'roles' => array(),
       'update_existing' => FALSE,
       'status' => 1,
+      'preserve_roles' => 1,
       'mappings' => array(),
     );
   }
@@ -149,9 +158,15 @@ class FeedsUserProcessor extends FeedsPr
       '#description' => t('If an existing user is found for an imported user, replace it. Existing users will be determined using mappings that are a "unique target".'),
       '#default_value' => $this->config['update_existing'],
     );
+    $form['preserve_roles'] = array(
+        '#type' => 'checkbox',
+        '#title' => t('Preserve existing roles'),
+        '#description' => t('Preserve the roles a replaced user had prior to an update. Checking this will add the roles selected in "Additional Roles" to the user\'s current roles. Leaving this unchecked will cause all roles to be replaced by the set selected in "Additional Roles."'),
+        '#default_value' => $this->config['preserve_roles'],
+      );    
     return $form;
   }
-
+    
   /**
    * Set target element.
    */
