? panels-cck-fields-restrictions.patch
Index: panels/relationships/node_from_user.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/content_profile/panels/relationships/Attic/node_from_user.inc,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 node_from_user.inc
--- panels/relationships/node_from_user.inc	15 Jun 2009 10:55:24 -0000	1.1.2.1
+++ panels/relationships/node_from_user.inc	18 Jul 2009 01:31:32 -0000
@@ -12,7 +12,7 @@
  */
 function content_profile_node_from_user_ctools_relationships() {
   $args['node_from_user'] = array(
-    'title' => t("Profile Node"),
+    'title' => t("Profile node"),
     'keyword' => 'content_profile',
     'description' => t('Adds a Content Profile from user context'),
     'required context' => new ctools_context_required(t('User'), 'user'),
@@ -30,7 +30,7 @@ function content_profile_node_from_user_
 function content_profile_node_from_user_ctools_context($context = NULL, $conf) {
   // If unset it wants a generic, unfilled context, which is just NULL
   if (empty($context->data)) {
-    return ctools_context_create_empty('node', NULL);
+    $context = ctools_context_create_empty('node', NULL);
   }
 
   if (isset($context->data->uid)) {
@@ -39,11 +39,23 @@ function content_profile_node_from_user_
     $content_profile_node = content_profile_load($conf['type'], $uid);
 
     // Send it to ctools
-    return ctools_context_create('node', $content_profile_node);
+    $context = ctools_context_create('node', $content_profile_node);
   }
   else {
-    return ctools_context_create_empty('node', NULL);
+    $context = ctools_context_create_empty('node', NULL);
   }
+
+  if (!empty($context)) {
+    if (isset($context->restrictions['type'])) {
+      $context->restrictions['type'][] = $conf['type'];
+    }
+    else {
+      $context->restrictions['type'] = array($conf['type']);
+    }
+
+    return $context;
+  }
+
 }
 
 /**
