diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-12-07 19:26:38 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-12-07 19:26:38 +0000 |
commit | 0eb40f8d197ec5d74b4963cd7bc671ed77726440 (patch) | |
tree | 1408c2ff1da23712ba93fa0f86a48a84a76baa2c /util | |
parent | ad0d5080ec446699043f7f0f19c5d46d48c29a0d (diff) | |
download | prosody-0eb40f8d197ec5d74b4963cd7bc671ed77726440.tar.gz prosody-0eb40f8d197ec5d74b4963cd7bc671ed77726440.zip |
util.prosodyctl: Prep JIDs before checking whether they exist (thanks tja)
Diffstat (limited to 'util')
-rw-r--r-- | util/prosodyctl.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/util/prosodyctl.lua b/util/prosodyctl.lua index f6cb8d7f..d7ca1a30 100644 --- a/util/prosodyctl.lua +++ b/util/prosodyctl.lua @@ -47,12 +47,13 @@ function adduser(params) end function user_exists(params) - local provider = prosody.hosts[params.host].users; + local user, host, password = nodeprep(params.user), nameprep(params.host), params.password; + local provider = prosody.hosts[host].users; if not(provider) or provider.name == "null" then - usermanager.initialize_host(params.host); + usermanager.initialize_host(host); end - return usermanager.user_exists(params.user, params.host); + return usermanager.user_exists(user, host); end function passwd(params) |