Changeset

3982:a20a41e512f8

usermanager: Assume authentication="anonymous" when anonymous_login=true.
author Waqas Hussain <waqas20@gmail.com>
date Mon, 27 Dec 2010 20:46:01 +0500
parents 3981:2b0b8fe68df2
children 3983:38ec7255b111
files core/usermanager.lua
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/core/usermanager.lua	Mon Dec 27 19:57:04 2010 +0500
+++ b/core/usermanager.lua	Mon Dec 27 20:46:01 2010 +0500
@@ -36,6 +36,7 @@
 	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 @@
 	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