From 5194830e0d85d4fbe87403150713c30bd4e9f90f Mon Sep 17 00:00:00 2001 From: James Wang Date: Wed, 23 Dec 2015 23:09:05 -0500 Subject: [PATCH] Make username duplication check case insensitive --- server/api/user.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/api/user.py b/server/api/user.py index f80a0db..53bfe13 100644 --- a/server/api/user.py +++ b/server/api/user.py @@ -17,7 +17,7 @@ def user_register(): password_confirm = request.form["password_confirm"] email = request.form["email"] - username_exists = Users.query.add_columns("name", "uid").filter_by(username=username).first() + username_exists = Users.query.add_columns("name", "uid").filter_by(username_lower=username.lower()).first() email_exists = Users.query.add_columns("name", "uid").filter_by(email=email).first() if password != password_confirm: