Allow for email address-based login
This commit is contained in:
parent
9d26c79db0
commit
e5f6a68248
2 changed files with 4 additions and 5 deletions
|
@ -439,9 +439,9 @@ def get_matching_users(username_prefix, robot_namespace=None,
|
|||
return (MatchingUserResult(*args) for args in query.tuples().limit(10))
|
||||
|
||||
|
||||
def verify_user(username, password):
|
||||
def verify_user(username_or_email, password):
|
||||
try:
|
||||
fetched = User.get(User.username == username)
|
||||
fetched = User.get((User.username == username_or_email) | (User.email == username_or_email))
|
||||
except User.DoesNotExist:
|
||||
return None
|
||||
|
||||
|
|
Reference in a new issue