# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: userreference.module
--- userreference.module Base (1.2)
+++ userreference.module Locally Modified (Based On 1.2)
@@ -850,16 +850,18 @@
           // Only add tables when reverse link has been selected.
           if ($field['type'] == 'userreference' && !empty($field['widget']['reverse_link'])) {
             $db_info = content_database_info($field);
-            $search_tables[$db_info['table']] = $db_info['columns']['uid']['column'];
+            $search_tables[$db_info['table']][] = $db_info['columns']['uid']['column'];
           }
         }
       }
-      foreach ($search_tables as $table => $column) {
+      foreach ($search_tables as $table => $columns) {
+        foreach($columns as $column){
         $ids = db_query(db_rewrite_sql("SELECT DISTINCT(n.nid), n.title, n.type FROM {node} n LEFT JOIN {". $table ."} f ON n.vid = f.vid WHERE f.". $column ."=". $account->uid. " AND n.status = 1"));
         while ($data = db_fetch_object($ids)) {
           $additions[$data->type][$data->nid] = $data->title;
         }
       }
+      }
\ No newline at end of file
       $account->userreference = $additions;
       break;
 
