Index: invite.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/invite/invite.install,v
retrieving revision 1.3.2.26
diff -u -r1.3.2.26 invite.install
--- invite.install	12 Nov 2007 23:19:09 -0000	1.3.2.26
+++ invite.install	2 Dec 2007 10:52:45 -0000
@@ -335,3 +335,13 @@
   return $ret;
 }
 
+/**
+ * Change user_register value to allow operation with LoginToboggan.
+ */
+function invite_update_12() {
+  if (variable_get('user_register', 1) == 'inviteonly') {
+    variable_set('user_register', '1-inviteonly');
+  }
+  return array();
+}
+
Index: invite.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/invite/invite.module,v
retrieving revision 1.10.2.91
diff -u -r1.10.2.91 invite.module
--- invite.module	1 Dec 2007 05:30:29 -0000	1.10.2.91
+++ invite.module	3 Dec 2007 00:27:21 -0000
@@ -157,7 +157,11 @@
   switch ($form_id) {
     case 'user_admin_settings':
       // Add new registration mode
-      $form['registration']['user_register']['#options']['inviteonly'] = t('New user registration by invitation only.');
+      // We prepend the option value with a numeric value to make 3rd party
+      // modules like LoginToboggan act like expected. To reliably determine
+      // the variable value later, we need to use the strict equality operator
+      // (===).
+      $form['registration']['user_register']['#options']['1-inviteonly'] = t('New user registration by invitation only.');
       break;
 
     case 'user_register':
@@ -187,7 +191,7 @@
           }
         }
       }
-      else if (variable_get('user_register', 1) == 'inviteonly') {
+      else if (variable_get('user_register', 1) === '1-inviteonly') {
         drupal_set_message(t('Sorry, new user registration by invitation only.'));
         drupal_goto();
     	}
@@ -195,7 +199,7 @@
 
     case 'user_login_block':
       // Remove temptation for non members to try and register
-      if (variable_get('user_register', 1) == 'inviteonly') {
+      if (variable_get('user_register', 1) === '1-inviteonly') {
         $new_items = array();
         $new_items[] = l(t('Request new password'), 'user/password', array('title' => t('Request new password via e-mail.')));
         $form['links']['#value'] = theme('item_list', $new_items);
@@ -279,7 +283,7 @@
  * Implementation of hook_disable().
  */
 function invite_disable() {
-  if (variable_get('user_register', 1) == 'inviteonly') {
+  if (variable_get('user_register', 1) === '1-inviteonly') {
     variable_set('user_register', 1);
     drupal_set_message(t('User registration option reset to %no_approval.', array('%no_approval' => t('Visitors can create accounts and no administrator approval is required.'))));
   }

