Index: subscriptions.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/subscriptions/subscriptions.module,v
retrieving revision 1.82
diff -u -r1.82 subscriptions.module
--- subscriptions.module	12 Aug 2008 01:13:08 -0000	1.82
+++ subscriptions.module	7 Jan 2009 00:32:11 -0000
@@ -524,10 +524,13 @@
       $defaults[$s['uid']] = $s;
     }
     if (empty($defaults[$uid])) {
-      // Note: This must not happen! subscriptions_user() takes care of inserting/removing records as users are created/deleted.
-      // If this happens, then users were created without calling the proper hooks.
-      drupal_set_message(t('Database error: user !uid not found in !table table!', array('!uid' => $uid, '!table' => '{subscriptions_user}')), 'error', FALSE);
-      $uid = -DRUPAL_AUTHENTICATED_RID;
+      // Note: This should not happen -- subscriptions_user() takes care of inserting/removing records as users are created/deleted.
+      // If it does happen, then users were created without calling the proper hooks, or they may have been created on another multi-site (#351753).
+      // Let's add the missing records, as if the user were being created just now, with the expected hook_user() invocations:
+      $account = user_load($uid);
+      subscriptions_user('insert', NULL, $account);
+      subscriptions_user('load', NULL, $account);
+      return _subscriptions_get_setting($name, $account);
     }
     $defaults[$uid]['uses_defaults'] = FALSE;
     foreach ($defaults[$uid] as $key => $value) {
