Index: og_mandatory_group.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/og_mandatory_group/og_mandatory_group.module,v
retrieving revision 1.9
diff -u -p -r1.9 og_mandatory_group.module
--- og_mandatory_group.module   28 Oct 2006 01:55:59 -0000      1.9
+++ og_mandatory_group.module   13 Sep 2007 01:22:41 -0000
@@ -71,7 +71,8 @@ function og_mandatory_group_user($op, &$
       }
       break;    
     case 'insert':
-      if (($group = variable_get('og_mandatory_group', 0)) != 0) {
+      // Sloppy modules may try to register an account with uid == 0.
+      if (($group = variable_get('og_mandatory_group', 0)) != 0 && $account->uid) {
         og_save_subscription($group, $account->uid, array('is_active' => 1));
         // mail the admins
         $node = node_load($group);
