Index: contributions/modules/abuse/abuse.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/abuse/abuse.admin.inc,v
retrieving revision 1.1
diff -u -p -r1.1 abuse.admin.inc
--- contributions/modules/abuse/abuse.admin.inc	7 Apr 2008 16:37:02 -0000	1.1
+++ contributions/modules/abuse/abuse.admin.inc	3 Dec 2008 23:09:35 -0000
@@ -451,8 +451,10 @@ function abuse_admin_ban_user($uid) {
   if ($user->uid > 1 && $user->uid !== $account->uid) {
     abuse_remove_account_content($account);
     sess_destroy_uid($uid);
-    db_query("INSERT INTO {access} (mask, type, status) VALUES ('%s', 'mail', 0)", $account->mail);
-    db_query("INSERT INTO {access} (mask, type, status) VALUES ('%s', 'user', 0)", $account->mail);
+    $aid = db_next_id('{access}_aid');
+    db_query("INSERT INTO {access} (aid, mask, type, status) VALUES (%d, '%s', 'mail', 0)", $aid, $account->mail);
+    $aid = db_next_id('{access}_aid');
+    db_query("INSERT INTO {access} (aid, mask, type, status) VALUES (%d, '%s', 'user', 0)", $aid, $account->name);
     db_query("UPDATE {users} SET status=0 WHERE uid=%d", $account->uid);
     $status = TRUE;
     $message = "The user !name has been banned.";
