aboutsummaryrefslogtreecommitdiffstats
path: root/core/usermanager.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-05-13 21:18:03 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-05-13 21:18:03 +0500
commitcadf6956dea22b215b9ab2874d3f11af322c2975 (patch)
tree59eb58db217c16b699e521113e5ae3ebd76adf72 /core/usermanager.lua
parentb8a433767a1b9279c5c44325d85a3aee696a6e66 (diff)
downloadprosody-cadf6956dea22b215b9ab2874d3f11af322c2975.tar.gz
prosody-cadf6956dea22b215b9ab2874d3f11af322c2975.zip
usermanager: Handle auth providers for components.
Diffstat (limited to 'core/usermanager.lua')
-rw-r--r--core/usermanager.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/usermanager.lua b/core/usermanager.lua
index e338ebbd..28e89369 100644
--- a/core/usermanager.lua
+++ b/core/usermanager.lua
@@ -22,7 +22,7 @@ module "usermanager"
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 @@ prosody.events.add_handler("host-activated", function (host)
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