﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19912	Authenticate users in multiple database	Evgeniy Makhmudov	Evgeniy Makhmudov	"A problem occur while using several database (each contains users tables) and don't using managers. Process authentication in Django is avaiable only for users table in default database. My proposal is in small modification in original (1.4) code:


{{{
# django.contrib.auth.backends.py
# class ModelBackend(object)
# ... 

    def authenticate(self, username=None, password=None, database='default'):
        try:
            user = User.objects.using(database).get(username=username)
            if user.check_password(password):
                return user
        except User.DoesNotExist:
            return None

}}}
I don't tested this from global point of view, but in my app it is working."	New feature	closed	contrib.auth	1.4	Normal	wontfix	authenticate		Unreviewed	1	0	1	0	0	0
