phpbb: Make the username case-insensitve on login again.
[matthijs/projects/wipi.git] / conf / auth / phpbb.py
index 4fc06b9e63fbbfccba20bb8d663fda65bb3edc73..58dd72cab6a01660383d15df62cd9f1b4a6eafc6 100644 (file)
@@ -218,7 +218,7 @@ class PhpbbAuth(BaseAuth):
         # case insensitive collaction for the username field, so
         # usernames are checked in case insensitive manner.
         cursor = conn.cursor ()
-        cursor.execute ("SELECT user_password,user_email,username FROM `%susers` WHERE username=%%s" % self.dbconfig['phpbb_prefix'], username)
+        cursor.execute ("SELECT user_password,user_email,username FROM `%susers` WHERE LOWER(username)=LOWER(%%s)" % self.dbconfig['phpbb_prefix'], username)
 
         # No data? No login.
         if (cursor.rowcount == 0):