diff options
Diffstat (limited to 'django/contrib/auth/forms.py')
| -rw-r--r-- | django/contrib/auth/forms.py | 2 |
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: |
