check if user active properly

This commit is contained in:
Curtis Castrapel 2018-03-26 13:14:22 -07:00
parent 9b4a124c08
commit 844202f36b
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