Index: views_attach.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_attach/views_attach.module,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 views_attach.module
--- views_attach.module	20 Jan 2009 21:19:48 -0000	1.1.2.3
+++ views_attach.module	31 Jan 2009 00:18:13 -0000
@@ -49,7 +49,9 @@
       $views = views_attach_get_user_views($category);
       foreach ($views as $info) {
         $view = views_get_view($info['name']);
-        $result = $view->execute_display($info['display']);
+        $view->set_display($info['display']);
+        $args = $view->display_handler->get_option('default_argument') === 'uid' ? array($account->uid) : array();
+        $result = $view->execute_display($info['display'], $args);
         if (!empty($result)) {
           $account->content[$view->name . '_' . $info['display']] = array(
             '#type' => 'user_profile_category',
@@ -78,7 +80,9 @@
       $views = views_attach_get_node_views($node->type, $mode);
       foreach ($views as $info) {
         $view = views_get_view($info['name']);
-        $result = $view->execute_display($info['display']);
+        $view->set_display($info['display']);
+        $args = $view->display_handler->get_option('default_argument') === 'nid' ? array($node->nid) : array();
+        $result = $view->execute_display($info['display'], $args);
         if (!empty($result)) {
           $node->content[$view->name . '_' . $info['display']] = array(
             '#title' => $view->get_title(),
Index: views_attach_plugin_display_node_content.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_attach/views_attach_plugin_display_node_content.inc,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 views_attach_plugin_display_node_content.inc
--- views_attach_plugin_display_node_content.inc	20 Jan 2009 21:44:38 -0000	1.1.2.1
+++ views_attach_plugin_display_node_content.inc	31 Jan 2009 00:21:36 -0000
@@ -11,6 +11,7 @@
     $options['types'] = array('default' => array());
     $options['teaser'] = array('default' => FALSE);
     $options['full'] = array('default' => TRUE);
+    $options['default_argument'] = array('default' => 'nid');
 
     return $options;
   }
@@ -65,6 +66,12 @@
     if (empty($weight)) {
       $weight = 10;
     }
+
+    $options['default_argument'] = array(
+      'category' => 'node_content',
+      'title' => t('Default argument'),
+      'value' => $this->get_option('default_argument') === 'nid' ? t('Yes') : t('No'),
+    );
   }
 
   /**
@@ -104,6 +111,15 @@
           '#default_value' => $this->get_option('full'),
         );
         break;
+
+      case 'default_argument':
+        $form['#title'] .= t('Default argument');
+        $form['default_argument'] = array(
+          '#type' => 'checkbox',
+          '#title' => t("Provide the current node id as a default argument."),
+          '#default_value' => $this->get_option('default_argument') === 'nid',
+          '#return_value' => 'nid',
+        );
       }
   }
 
@@ -120,6 +136,9 @@
       case 'full':
         $this->set_option('full', $form_state['values']['full']);
         break;
+      case 'default_argument':
+        $this->set_option('default_argument', $form_state['values']['default_argument']);
+        break;
     }
   }
 
Index: views_attach_plugin_display_profile.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_attach/views_attach_plugin_display_profile.inc,v
retrieving revision 1.1
diff -u -r1.1 views_attach_plugin_display_profile.inc
--- views_attach_plugin_display_profile.inc	13 Jan 2009 08:07:10 -0000	1.1
+++ views_attach_plugin_display_profile.inc	31 Jan 2009 00:20:03 -0000
@@ -10,6 +10,7 @@
 
     $options['weight'] = array('default' => 10);
     $options['category'] = array('default' => NULL);
+    $options['default_argument'] = array('default' => 'uid');
 
     return $options;
   }
@@ -48,6 +49,12 @@
       'title' => t('Weight'),
       'value' => $weight,
     );
+
+    $options['default_argument'] = array(
+      'category' => 'profile',
+      'title' => t('Default argument'),
+      'value' => $this->get_option('default_argument') === 'uid' ? t('Yes') : t('No'),
+    );
   }
 
   /**
@@ -74,6 +81,15 @@
           '#default_value' => $this->get_option('category'),
         );
         break;
+      case 'default_argument':
+        $form['#title'] .= t('Default argument');
+        $form['default_argument'] = array(
+          '#type' => 'checkbox',
+          '#title' => t("Provide the current user id as a default argument."),
+          '#default_value' => $this->get_option('default_argument') === 'uid',
+          '#return_value' => 'uid',
+        );
+        break;
     }
   }
 
@@ -87,6 +103,9 @@
       case 'category':
         $this->set_option('category', $form_state['values']['category']);
         break;
+      case 'default_argument':
+        $this->set_option('default_argument', $form_state['values']['default_argument']);
+        break;
     }
   }
 
