configmanager: Update Include and RunScript directives to support paths relative...
[prosody.git] / core / usermanager.lua
index 5fc4a8229edbe60332818846ce13bd59872c82fe..83de193f082eb4fed8fc51eef9912a87ba3f492c 100644 (file)
@@ -50,14 +50,13 @@ function initialize_host(host)
                        host_session.users = new_null_provider();
                end
        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 auth_provider ~= "null" then
-               modulemanager.load(host, "auth_"..auth_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 auth_provider ~= "null" then
+               modulemanager.load(host, "auth_"..auth_provider);
+       end
 end;
 prosody.events.add_handler("host-activated", initialize_host, 100);
-prosody.events.add_handler("component-activated", initialize_host, 100);
 
 function test_password(username, host, password)
        return hosts[host].users.test_password(username, password);