fixing bugs with email ignore case feature
This commit is contained in:
@ -15,8 +15,8 @@ class DBModel:
|
||||
everLoggedIn = len(self.cursor.fetchall())
|
||||
ignoreCaseMatches = []
|
||||
if everLoggedIn == 0:
|
||||
self.cursor.execute("SELECT email FROM accounts WHERE lower_case_email = %s", (email.lower(), ))
|
||||
ignoreCaseMatches = self.cursor.fetchall()
|
||||
self.cursor.execute("SELECT email FROM accounts WHERE lower_case_email = %s AND email != %s", (email.lower(), email))
|
||||
ignoreCaseMatches = list(map(lambda x: x[0], self.cursor.fetchall()))
|
||||
|
||||
if hasExactMatch == 0:
|
||||
self.cursor.execute("INSERT INTO accounts (email, lower_case_email) VALUES (%s, %s)", (email, email.lower()))
|
||||
|
Reference in New Issue
Block a user