'Return the path to the first found authentication backend that recognizes the given user.'

@staticmethod
def _get_path_of_arbitrary_backend_for_user(user):

    for backend_path in settings.AUTHENTICATION_BACKENDS:
        backend = auth.load_backend(backend_path)
        if backend.get_user(user.id):
            return backend_path
