1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-vps-admin.git synced 2025-02-12 10:31:52 +00:00
This commit is contained in:
Ycarus 2020-06-30 17:04:52 +02:00
parent a0f4b7f827
commit d9fa673a9c

View file

@ -114,7 +114,7 @@ def get_username_from_userid(userid):
data = json.loads(content)
except ValueError as e:
return {'error': 'Config file not readable', 'route': 'get_username'}
for user as content['users'][0]:
for user in content['users'][0]:
if 'userid' in content['users'][0][user] and content['users'][0][user]['userid'] == userid:
return user
return ''