projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
42a779b
)
usermanager: Assume authentication="anonymous" when anonymous_login=true.
author
Waqas Hussain
<waqas20@gmail.com>
Mon, 27 Dec 2010 15:46:01 +0000
(20:46 +0500)
committer
Waqas Hussain
<waqas20@gmail.com>
Mon, 27 Dec 2010 15:46:01 +0000
(20:46 +0500)
core/usermanager.lua
patch
|
blob
|
history
diff --git
a/core/usermanager.lua
b/core/usermanager.lua
index 1aea0de9b86f6c1ad17519023b86cd9e8c20f9cb..2e64af8c48a82351c48b02d8fcd75417d6562b63 100644
(file)
--- 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;
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
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;
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
if auth_provider ~= "null" then
modulemanager.load(host, "auth_"..auth_provider);
end