diff options
author | Waqas Hussain <waqas20@gmail.com> | 2010-12-27 20:46:01 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2010-12-27 20:46:01 +0500 |
commit | 318b00eeb121d48c1e1466cc67419a4f8830debd (patch) | |
tree | 4d3be3799ffccfa00813fb864b4634b88fd3e252 /core | |
parent | 1865c2454bf4037fdc992485451de1fc5214c508 (diff) | |
download | prosody-318b00eeb121d48c1e1466cc67419a4f8830debd.tar.gz prosody-318b00eeb121d48c1e1466cc67419a4f8830debd.zip |
usermanager: Assume authentication="anonymous" when anonymous_login=true.
Diffstat (limited to 'core')
-rw-r--r-- | core/usermanager.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/usermanager.lua b/core/usermanager.lua index 1aea0de9..2e64af8c 100644 --- a/core/usermanager.lua +++ b/core/usermanager.lua @@ -36,6 +36,7 @@ function initialize_host(host) host_session.events.add_handler("item-added/auth-provider", function (event) local provider = event.item; local auth_provider = config.get(host, "core", "authentication") or default_provider; + if config.get(host, "core", "anonymous_login") then auth_provider = "anonymous"; end -- COMPAT 0.7 if provider.name == auth_provider then host_session.users = provider; end @@ -51,6 +52,7 @@ function initialize_host(host) end); host_session.users = new_null_provider(); -- Start with the default usermanager provider local auth_provider = config.get(host, "core", "authentication") or default_provider; + if config.get(host, "core", "anonymous_login") then auth_provider = "anonymous"; end -- COMPAT 0.7 if auth_provider ~= "null" then modulemanager.load(host, "auth_"..auth_provider); end |