@@ -0,0 +1,576 @@
+from django.contrib.auth.backends import ModelBackend%0Afrom multimail.models import EmailAddress%0A%0Aclass MultiEmailAuthenticationBackend(ModelBackend):%0A    %22%22%22Allows to login via email address and password. username is interpreted as email address.%22%22%22%0A%0A    def authenticate(self, username=None, password=None):%0A%0A        try:%0A            email = EmailAddress.objects.get(email__iexact=username)%0A            user = email.user%0A        except EmailAddress.DoesNotExist:%0A            return None%0A%0A        if user.check_password(password):%0A            return user%0A%0A        return None%0A

add MultiEmailAuthenticationBackend