Index: tokenauth.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/tokenauth/Attic/tokenauth.install,v
retrieving revision 1.3.4.9
diff -u -r1.3.4.9 tokenauth.install
--- tokenauth.install	17 Aug 2010 22:13:54 -0000	1.3.4.9
+++ tokenauth.install	25 Sep 2010 19:38:26 -0000
@@ -52,8 +52,8 @@
   while ($row = db_fetch_object($result)) {
     tokenauth_insert($row->uid);
   }
-  // Clean up orphaned table rows from previous tokenauth use.
-  db_query("DELETE FROM {tokenauth_tokens} WHERE NOT EXISTS (SELECT * FROM {users} WHERE users.uid=tokenauth_tokens.uid)");
+  // Clean up orphaned tokens from users removed while module disabled
+  db_query("DELETE FROM {tokenauth_tokens} tt WHERE NOT EXISTS (SELECT * FROM {users} u WHERE u.uid=tt.uid)");
 }
 
 /**
