I set the user password and it checks out, but I can't login in various login forms. I can't authenticate:
u = User.objects.get(username='foobar')
u.set_password('123')
u.save()
u.check_password('123') # True
authenticate(username='foobar', password='123') # None?!?!
I can't log the user in though I've tried various ways.
Make sure that the user is_active. If the user does not have the .is_active flag set to True, it can lead to unusual behavior. Maybe your user got accidentally shadow banned :D
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With