def user_can_authenticate(self, user):
is_active = getattr(user, '<STR_LIT>', None)<EOL>return is_active or is_active is None<EOL>
Reject users with is_active=False. Custom user models that don't have
that attribute are allowed.