Skip to content
This repository has been archived by the owner on May 26, 2020. It is now read-only.

Unreachable code when user is_active is False in. #491

Open
tzimos opened this issue Sep 15, 2019 · 1 comment
Open

Unreachable code when user is_active is False in. #491

tzimos opened this issue Sep 15, 2019 · 1 comment

Comments

@tzimos
Copy link

tzimos commented Sep 15, 2019

When using the default ModelBackend in django settings activated,
the authenticate method in django.contrib.auth.backends.ModelBackend has the user_can_authenticate method.
In our case user.is_active is False and as a result the whole authenticate method in
this file returns None.
As a result in line 53 there is a check if the user is_active but it is unreachable in this point
and we render the wrong message which is in line 64.

@prairiewest
Copy link

Please look at #484. The project is unmaintained, and you should close this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants