Software /
code /
prosody
Changeset
3036:0714539bcf71
usermanager: Handle auth providers for components.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Thu, 13 May 2010 21:18:03 +0500 |
parents | 3035:5584c928d1f7 |
children | 3037:0319abdcf04f |
files | core/usermanager.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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