# HG changeset patch # User Waqas Hussain # Date 1273767483 -18000 # Node ID 0714539bcf7107d170bd428d4650508342822327 # Parent 5584c928d1f77253beeb9b020979b7f3709fe36f usermanager: Handle auth providers for components. diff -r 5584c928d1f7 -r 0714539bcf71 core/usermanager.lua --- a/core/usermanager.lua Wed May 12 23:06:46 2010 +0100 +++ b/core/usermanager.lua Thu May 13 21:18:03 2010 +0500 @@ -22,7 +22,7 @@ local new_default_provider; -prosody.events.add_handler("host-activated", function (host) +local function host_handler(host) local host_session = hosts[host]; host_session.events.add_handler("item-added/auth-provider", function (provider) if config.get(host, "core", "authentication") == provider.name then @@ -35,7 +35,9 @@ end end); host_session.users = new_default_provider(host); -- Start with the default usermanager provider -end); +end +prosody.events.add_handler("host-activated", host_handler); +prosody.events.add_handler("component-activated", host_handler); local function is_cyrus(host) return config.get(host, "core", "sasl_backend") == "cyrus"; end