Skip to content

Commit

Permalink
backend fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tonjo committed Oct 9, 2013
1 parent 7fdf818 commit dc28347
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neo4django/graph_auth/backends.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .models import User
from django.contrib.auth import get_user_model


class NodeModelBackend(object):
Expand All @@ -11,7 +12,7 @@ class NodeModelBackend(object):

def authenticate(self, username=None, password=None):
try:
user = User.objects.get(username=username)
user = get_user_model().objects.get(username=username)
if user is not None and user.check_password(password):
return user
except User.DoesNotExist:
Expand Down

0 comments on commit dc28347

Please sign in to comment.