--- drupal-dev/sites/all/modules/invite/invite.module	2009-05-28 04:29:53.000000000 +0000
+++ drupal-orig/current/sites/all/modules/invite/invite.module	2009-05-28 03:29:43.000000000 +0000
@@ -388,7 +388,7 @@
         // Try to look up an invitation in case a user has been invited to join
         // the site, but did go straight to the site and signed up without
         // using the invite link.
-        $code = db_result(db_query("SELECT reg_code FROM {invite} WHERE email = lower('%s')", $account->mail));
+        $code = db_result(db_query("SELECT reg_code FROM {invite} WHERE email = '%s'", $account->mail));
         if ($code) {
           $invite = invite_load($code);
         }
@@ -422,12 +422,12 @@
  */
 function invite_accept($invite, $account) {
   // Update the invitation record.
-  db_query("UPDATE {invite} SET email = lower('%s'), invitee = %d, joined = %d WHERE reg_code = '%s'", $account->mail, $account->uid, time(), $invite->reg_code);
+  db_query("UPDATE {invite} SET email = '%s', invitee = %d, joined = %d WHERE reg_code = '%s'", $account->mail, $account->uid, time(), $invite->reg_code);
   // Delete all invites to these e-mail addresses, except this one.
-  db_query("DELETE FROM {invite} WHERE (email = '%s' OR email = lower('%s')) AND reg_code <> '%s'", $invite->email, $account->mail, $invite->reg_code);
+  db_query("DELETE FROM {invite} WHERE (email = '%s' OR email = '%s') AND reg_code <> '%s'", $invite->email, $account->mail, $invite->reg_code);
   // Add all users who invited this particular e-mail address to the
   // notification queue.
-  db_query("INSERT INTO {invite_notifications} (uid, invitee) SELECT uid, %d from {invite} WHERE (email = '%s' OR email = lower('%s')) AND canceled = 0", $account->uid, $invite->email, $account->mail);
+  db_query("INSERT INTO {invite_notifications} (uid, invitee) SELECT uid, %d from {invite} WHERE (email = '%s' OR email = '%s') AND canceled = 0", $account->uid, $invite->email, $account->mail);
   // Escalate the invitee's role.
   _invite_escalate_role($account);
   // Unblock user account.
@@ -931,7 +931,7 @@
     $email = preg_replace('/^.*<(.*)>$/', '${1}', trim($email));
     if ($email) {
       if (preg_match($rx, $email, $match)) {
-        $valid_emails[] = strtolower($match[1]);
+        $valid_emails[] = $match[1];
       }
       else {
         $failed_emails[] = $email;
