We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8bccaa6 commit 0db8482Copy full SHA for 0db8482
1 file changed
apps/users/utils.py
@@ -8,7 +8,7 @@
8
from paramiko.rsakey import RSAKey
9
from django.conf import settings
10
from django.contrib.auth.mixins import UserPassesTestMixin
11
-from django.urls import reverse_lazy
+from django.contrib.auth import authenticate
12
from django.utils.translation import ugettext as _
13
from django.core.cache import cache
14
@@ -140,7 +140,7 @@ def check_user_valid(**kwargs):
140
elif not user.is_valid:
141
return None, _('Disabled or expired')
142
143
- if password and user.password and user.check_password(password):
+ if password and authenticate(username=username, password=password):
144
return user, ''
145
146
if public_key and user.public_key:
0 commit comments