mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-12-04 11:05:32 +00:00
Fix case sensitivity for duplicate username creation
This commit is contained in:
parent
ad9e4938bc
commit
7fcd2b8aa6
@ -408,7 +408,7 @@ class User(db.Model):
|
||||
Create local user witch stores username / password in the DB
|
||||
"""
|
||||
# check if username existed
|
||||
user = User.query.filter(User.username == self.username).first()
|
||||
user = User.query.filter(User.username.lower() == self.username.lower()).first()
|
||||
if user:
|
||||
return {'status': False, 'msg': 'Username is already in use'}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user