@@ -0,0 +1,611 @@
+from django.contrib.auth.backends import ModelBackend%0Afrom django.contrib.auth.models import User%0Afrom django.db.models import Q%0A%0A%0Aclass ModelBackend(ModelBackend):%0A    %22%22%22%0A    Authentication backend which knows how to handle e-mails or usernames%0A    %22%22%22%0A%0A    def authenticate(self, username=None, password=None):%0A        for user in User.objects.filter(%0A                Q(username__iexact=username)%0A                %7C Q(email__iexact=username)%0A                %7C Q(drudge__zdp_no__iexact=username)%0A                ):%0A            if user.check_password(password):%0A                return user%0A%0A        return None%0A

Allow authentication with ZDP No. as well