summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spoken_auth/backends.py2
-rw-r--r--spoken_auth/models.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/spoken_auth/backends.py b/spoken_auth/backends.py
index a46ea80..d69d1c7 100644
--- a/spoken_auth/backends.py
+++ b/spoken_auth/backends.py
@@ -11,7 +11,7 @@ class DrupalAuthBackend(object):
def authenticate(self, username=None, password=None):
user_logged_in.disconnect(update_last_login)
try:
- user = User.objects.get(username=username)
+ user = User.objects.get(username=username, is_active=True)
if user.check_password(password):
return user
return None
diff --git a/spoken_auth/models.py b/spoken_auth/models.py
index 431330d..c2fbb6b 100644
--- a/spoken_auth/models.py
+++ b/spoken_auth/models.py
@@ -9,6 +9,7 @@ class Users(AbstractBaseUser):
id = models.IntegerField(primary_key=True)
username = models.CharField(max_length=100L, unique=True)
email = models.CharField(max_length=100L, unique=True)
+ is_active = models.BooleanField()
USERNAME_FIELD = 'username'
class Meta:
db_table = 'auth_user'