projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mod_s2s: Detect TLS compression
[prosody.git]
/
util
/
prosodyctl.lua
diff --git
a/util/prosodyctl.lua
b/util/prosodyctl.lua
index 128eec2cfd4bbe32f5fa8295672f58b1aa8c72f3..e38f85d47a26ea5a6d0e24e5dbea7ebb0cfde0a9 100644
(file)
--- a/
util/prosodyctl.lua
+++ b/
util/prosodyctl.lua
@@
-136,11
+136,11
@@
function adduser(params)
return false, "invalid-hostname";
end
return false, "invalid-hostname";
end
- local host = prosody.hosts[host];
- if not host then
+ local host
_session
= prosody.hosts[host];
+ if not host
_session
then
return false, "no-such-host";
end
return false, "no-such-host";
end
- local provider = host.users;
+ local provider = host
_session
.users;
if not(provider) or provider.name == "null" then
usermanager.initialize_host(host);
end
if not(provider) or provider.name == "null" then
usermanager.initialize_host(host);
end
@@
-176,9
+176,9
@@
function deluser(params)
if not _M.user_exists(params) then
return false, "no-such-user";
end
if not _M.user_exists(params) then
return false, "no-such-user";
end
-
params.password = nil
;
+
local user, host = nodeprep(params.user), nameprep(params.host)
;
- return
_M.adduser(params
);
+ return
usermanager.delete_user(user, host
);
end
function getpid()
end
function getpid()
@@
-273,3
+273,5
@@
function reload()
signal.kill(pid, signal.SIGHUP);
return true;
end
signal.kill(pid, signal.SIGHUP);
return true;
end
+
+return _M;