# HG changeset patch # User Matthew Wild # Date 1367064663 -3600 # Node ID e9090966c80313589239d652b14c761c801e0ae6 # Parent 3912c9264ef0e3410d7f6fdd699ff62853eae8ac util.prosodyctl: Initialize storagemanager on the host before initializing usermanager. This fixes brokenness when the auth provider opens the store on load (as they all do since eeea0eb2602a) (thanks nulani) diff -r 3912c9264ef0 -r e9090966c803 util/prosodyctl.lua --- a/util/prosodyctl.lua Fri Apr 26 12:25:25 2013 +0100 +++ b/util/prosodyctl.lua Sat Apr 27 13:11:03 2013 +0100 @@ -140,11 +140,12 @@ if not host_session then return false, "no-such-host"; end + + storagemanager.initialize_host(host); local provider = host_session.users; if not(provider) or provider.name == "null" then usermanager.initialize_host(host); end - storagemanager.initialize_host(host); local ok, errmsg = usermanager.create_user(user, password, host); if not ok then @@ -155,11 +156,12 @@ function user_exists(params) local user, host, password = nodeprep(params.user), nameprep(params.host), params.password; + + storagemanager.initialize_host(host); local provider = prosody.hosts[host].users; if not(provider) or provider.name == "null" then usermanager.initialize_host(host); end - storagemanager.initialize_host(host); return usermanager.user_exists(user, host); end