From a0b1bc6c2f122876d2ce4a90a48d730afe31b205 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 7 Dec 2010 19:26:38 +0000 Subject: util.prosodyctl: Prep JIDs before checking whether they exist (thanks tja) --- util/prosodyctl.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'util') 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) -- cgit v1.2.3