--- invite.module.org	2011-07-11 20:38:05.000000000 -0700
+++ invite.module	2011-07-13 08:24:30.000000000 -0700
@@ -272,7 +272,20 @@
   }
 
   // Let the default handler take care of standard conditions.
-  return user_register_access();
+  // If denied, allow exception for invite code (FIXME need to make this configurable)
+  if (user_register_access())
+  {
+    return TRUE;
+  }
+
+  // If no invitation, we already know access is denied
+  if (!$invite)
+  {
+    return FALSE;
+  }
+
+  // Allow access if invitation is valid
+  return invite_validate($invite);
 }
 
 /**
@@ -478,7 +491,7 @@
   if ($invite) {
     // Process the invitation and assign target roles to the user. These
     // will be saved by user_save().
-    $roles = invite_process($invite, $account);
+    $roles = invite_process_invite($invite, $account);
 
     if ($roles) {
       if (!isset($edit['roles']) || !is_array($edit['roles'])) {
