From e4fa6131f5239a266eae72317738f68327e65003 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 14 Feb 2011 16:29:54 +0100 Subject: [PATCH] phpbb: Make the username case-insensitve on login again. The username field in the phpbb3 database is case sensitive (i.e., it has utf_bin collation), whereas in phpbb2 it was case insensitive. This commit changes the SQL query to make logins case insensitive again, since a lot of people used a capital letter for registering their username, but forgot that later on... --- auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth.py b/auth.py index 9d8566f..23b48bb 100644 --- a/auth.py +++ b/auth.py @@ -62,7 +62,7 @@ class PhpBBBackend: # Get some data cursor = conn.cursor () - cursor.execute ("SELECT user_password,user_email FROM %susers WHERE username=%%s" % prefix, username) + cursor.execute ("SELECT user_password,user_email FROM %susers WHERE LOWER(username)=LOWER(%%s)" % prefix, username) # No data? No login. if (cursor.rowcount == 0): -- 2.30.2