':type fallback: bool
:rtype: ajenti.usersync.UserSyncProvider'

def get_sync_provider(self, fallback=False):

    for p in ajenti.usersync.UserSyncProvider.get_classes():
        p.get()
        if (p.id == self.classconfig['sync-provider']):
            try:
                p.get().test()
            except:
                if fallback:
                    return ajenti.usersync.AjentiSyncProvider.get()
            return p.get()
