--- views_plugin_argument_validate_user_original.inc	2010-03-10 20:23:39.000000000 -0500
+++ views_plugin_argument_validate_user.inc	2010-05-22 09:09:23.000000000 -0400
@@ -22,8 +22,8 @@ class views_plugin_argument_validate_use
       '#title' => t('Type of user argument to allow'),
       '#options' => array(
         'uid' => t('Only allow numeric UIDs'),
-        'name' => t('Only allow string usernames'),
-        'either' => t('Allow both numeric UIDs and string usernames'),
+        'name' => t('Only allow string user fields'),
+        'either' => t('Allow both numeric UIDs and string user fields'),
       ),
       '#default_value' => $this->argument->options['validate_user_argument_type'],
       '#process' => array('expand_radios', 'views_process_dependency'),
@@ -59,6 +59,8 @@ class views_plugin_argument_validate_use
 
   function validate_argument($argument) {
     $type = $this->argument->options['validate_user_argument_type'];
+    // add the field of the argument type to search and return on it
+    $arg_fld = $this->argument->options['field'];
     // is_numeric() can return false positives, so we ensure it's an integer.
     // However, is_integer() will always fail, since $argument is a string.
     if (is_numeric($argument) && $argument == (int)$argument) {
@@ -74,7 +76,7 @@ class views_plugin_argument_validate_use
         if ($argument == $GLOBALS['user']->name) {
           $account = $GLOBALS['user'];
         }
-        $where = "name = '%s'";
+        $where = $arg_fld.	" = '%s'";
       }
     }
 
@@ -84,7 +86,7 @@ class views_plugin_argument_validate_use
     }
 
     if (!isset($account)) {
-      $query = "SELECT uid, name FROM {users} WHERE $where";
+      $query = "SELECT uid, $arg_fld FROM {users} WHERE $where";
       $account = db_fetch_object(db_query($query, $argument));
     }
     if (empty($account)) {
@@ -106,7 +108,8 @@ class views_plugin_argument_validate_use
       }
     }
 
-    $this->argument->argument = $account->uid;
+    //return TRUE but set the argument to the right value for the field
+    $this->argument->argument = $account->{$arg_fld};
     $this->argument->validated_title = check_plain($account->name);
     return TRUE;
   }
