Merge pull request #1138 from castrapel/useractive

check if user active properly
This commit is contained in:
Curtis 2018-03-26 13:31:13 -07:00 committed by GitHub
commit 12135c445b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -337,7 +337,7 @@ class Ping(Resource):
roles = create_user_roles(profile)
update_user(user, profile, roles)
if not user.active:
if not user or not user.active:
metrics.send('login', 'counter', 1, metric_tags={'status': FAILURE_METRIC_STATUS})
return dict(message='The supplied credentials are invalid'), 403