diff options
author | Matthew Wild <mwild1@gmail.com> | 2013-04-27 13:11:03 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2013-04-27 13:11:03 +0100 |
commit | fbee5003f73a49a392e5fa015ff8589e990ce25e (patch) | |
tree | 9b879f442fc3bbd26b745a241277a8fa7a03f2bf /util/prosodyctl.lua | |
parent | de337196d4b4952b9da5604d2437782c0372f8dd (diff) | |
download | prosody-fbee5003f73a49a392e5fa015ff8589e990ce25e.tar.gz prosody-fbee5003f73a49a392e5fa015ff8589e990ce25e.zip |
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)
Diffstat (limited to 'util/prosodyctl.lua')
-rw-r--r-- | util/prosodyctl.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua index 1ab1d0bb..b80a69f2 100644 --- a/util/prosodyctl.lua +++ b/util/prosodyctl.lua @@ -140,11 +140,12 @@ function adduser(params) 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 @@ end 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 |