portmanager: Show a friendly error message when initializing SSL fails (thanks MattJ...
[prosody.git] / core / usermanager.lua
index 9e5a016c5c0fa75640bfe60c87eb7a20f9d98c4e..3aba5786c5f82048ade6fc7e9a8270be78d7c8e3 100644 (file)
@@ -41,7 +41,10 @@ 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 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
@@ -88,8 +91,8 @@ function delete_user(username, host)
        return hosts[host].users.delete_user(username);
 end
 
-function get_sasl_handler(host)
-       return hosts[host].users.get_sasl_handler();
+function get_sasl_handler(host, session)
+       return hosts[host].users.get_sasl_handler(session);
 end
 
 function get_provider(host)