Make username duplication check case insensitive
This commit is contained in:
parent
41f5e34aa6
commit
5194830e0d
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ def user_register():
|
||||||
password_confirm = request.form["password_confirm"]
|
password_confirm = request.form["password_confirm"]
|
||||||
email = request.form["email"]
|
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()
|
email_exists = Users.query.add_columns("name", "uid").filter_by(email=email).first()
|
||||||
|
|
||||||
if password != password_confirm:
|
if password != password_confirm:
|
||||||
|
|
Loading…
Reference in a new issue