﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
1991	User accounts with is_active	dave@…	Adrian Holovaty	"My thought on how to fix this is to change this line in {{{django.contrib.auth.forms.isValidUser}}} from this:
{{{
            self.user_cache = User.objects.get(username=field_data)
}}}
to this:
{{{
            self.user_cache = User.objects.filter(is_active=True).get(username=field_data)
}}}


Or add a second {{{Manager}}} to {{{django.contrib.auth.models}}} :
{{{
class ActiveUser(models.Manager):
    def get_query_set(self):
        return super(ActiveUser, self).get_query_set().filter(is_active=True)
}}}
and add these two lines to {{{django.contrib.auth.models.Article}}} :
{{{
    objects = models.Manager()
    published = ActiveUser()
}}}
and instead of the line above for {{{isValidUser}}}, put this:
{{{
            self.user_cache = ActiveUser.objects.get(username=field_data)
}}}
Don't forget to do: {{{from django.contrib.auth.users.models import ActiveUser}}}"	enhancement	closed	contrib.admin	dev	blocker	fixed	auth	gokerno	Unreviewed	0	0	0	0	0	0
