summaryrefslogtreecommitdiff
path: root/django/contrib/auth/forms.py
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2006-06-06 01:21:49 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2006-06-06 01:21:49 +0000
commite976ed1f7910fad03704f88853c5c5b36cbab134 (patch)
treec4c8d32d4298f64ad9ce8e7813084c2f45a9dc40 /django/contrib/auth/forms.py
parent0c341d780ebcde0e81c81eda07e2db3aaa92549b (diff)
multi-auth: Merged to [3085]
git-svn-id: http://code.djangoproject.com/svn/django/branches/multi-auth@3086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/contrib/auth/forms.py')
-rw-r--r--django/contrib/auth/forms.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/contrib/auth/forms.py b/django/contrib/auth/forms.py
index f5f622665c..ef81268e2a 100644
--- a/django/contrib/auth/forms.py
+++ b/django/contrib/auth/forms.py
@@ -35,6 +35,8 @@ class AuthenticationForm(forms.Manipulator):
self.user_cache = authenticate(username=username, password=password)
if self.user_cache is None:
raise validators.ValidationError, _("Please enter a correct username and password. Note that both fields are case-sensitive.")
+ elif not self.user_cache.is_active:
+ raise validators.ValidationError, _("This account is inactive.")
def get_user_id(self):
if self.user_cache: