mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-03 03:37:28 +01:00
Fix potential issue with existing user query matching multiple users
This commit is contained in:
parent
bce06d45d0
commit
bb39f268d3
@ -105,7 +105,7 @@ def callback(oauth_token):
|
|||||||
else:
|
else:
|
||||||
existing_user = (User.query
|
existing_user = (User.query
|
||||||
.filter(or_(User.username == github_username, User.forums_username == github_username))
|
.filter(or_(User.username == github_username, User.forums_username == github_username))
|
||||||
.one_or_none())
|
.first())
|
||||||
if existing_user:
|
if existing_user:
|
||||||
flash(gettext("Unable to create an account as the username is already taken. "
|
flash(gettext("Unable to create an account as the username is already taken. "
|
||||||
"If you meant to log in, you need to connect GitHub to your account first"), "danger")
|
"If you meant to log in, you need to connect GitHub to your account first"), "danger")
|
||||||
|
Loading…
Reference in New Issue
Block a user