usermanager: Add log error for use of COMPAT config option 'anonymous_login'. To be removed in next version.
authorMatthew Wild <mwild1@gmail.com>
Sat, 28 Apr 2012 14:35:52 +0100
changeset 4773 ee55956597f4
parent 4772 fc16f39e0c79
child 4774 b2ed4e1bcb6e
usermanager: Add log error for use of COMPAT config option 'anonymous_login'. To be removed in next version.
core/usermanager.lua
--- a/core/usermanager.lua	Sat Apr 28 14:31:02 2012 +0100
+++ b/core/usermanager.lua	Sat Apr 28 14:35:52 2012 +0100
@@ -41,7 +41,10 @@
 	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 config.get(host, "core", "anonymous_login") then
+			log("error", "Deprecated config option 'anonymous_login'. Use authentication = 'anonymous' instead.");
+			auth_provider = "anonymous";
+		end -- COMPAT 0.7
 		if provider.name == auth_provider then
 			host_session.users = setmetatable(provider, provider_mt);
 		end