Index: nodeprofile.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodeprofile/nodeprofile.module,v
retrieving revision 1.7.2.2
diff -u -p -r1.7.2.2 nodeprofile.module
--- nodeprofile.module	25 Feb 2007 14:49:15 -0000	1.7.2.2
+++ nodeprofile.module	28 Mar 2007 02:52:57 -0000
@@ -197,6 +197,44 @@ function nodeprofile_user($op, &$edit, &
       }
       break;
 
+    case 'view':
+      if (module_exists('usernode')) {
+        break;
+      }
+      $typenames = array();
+      foreach (node_get_types('names') as $typename => $visiblename) {
+        if (is_nodeprofile($typename)) {
+          $typenames[] = $typename;
+          $typenames = array_merge($typenames, nodefamily_get_descendant_types($typename));
+        }
+      }
+      $cond = array();
+      $arguments = array();
+      foreach ($typenames as $typename) {
+        $cond[] = "type = '%s'";
+        $arguments[] = $typename;
+      }
+      $cond = implode(' OR ', $cond);
+      $arguments[] = $account->uid;
+      if ($cond) {
+        $result = db_query("
+          SELECT nid, type
+          FROM {node}
+          WHERE (". $cond .")
+          AND uid = %d
+        ", $arguments);
+        while ($node = db_fetch_object($result)) {
+          $value = node_view(node_load($node->nid));
+          $type = node_get_types('name', $node->type);
+          $fields[$type]['nodeprofile'] = array(
+            'title' => NULL,
+            'value' => $value,
+            'class' => $node->type,
+          );
+        }
+      }
+      return $fields;
+
     default:
       break;
   }
