mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-12-04 19:15:30 +00:00
Fix case sensitivity for duplicate email creation
This commit is contained in:
parent
7fcd2b8aa6
commit
c52bdd0daf
@ -413,7 +413,7 @@ class User(db.Model):
|
|||||||
return {'status': False, 'msg': 'Username is already in use'}
|
return {'status': False, 'msg': 'Username is already in use'}
|
||||||
|
|
||||||
# check if email existed
|
# check if email existed
|
||||||
user = User.query.filter(User.email == self.email).first()
|
user = User.query.filter(User.email.lower() == self.email.lower()).first()
|
||||||
if user:
|
if user:
|
||||||
return {'status': False, 'msg': 'Email address is already in use'}
|
return {'status': False, 'msg': 'Email address is already in use'}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user