Software /
code /
prosody
Comparison
util/prosodyctl.lua @ 5102:ae8a993b598d
util.prosodyctl: Use usermanager to delete users instead of unsetting their password
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 25 Aug 2012 01:33:01 +0200 |
parent | 5023:dcc8e789df36 |
child | 5379:27de7cc94111 |
comparison
equal
deleted
inserted
replaced
5101:a94c43cad081 | 5102:ae8a993b598d |
---|---|
174 | 174 |
175 function deluser(params) | 175 function deluser(params) |
176 if not _M.user_exists(params) then | 176 if not _M.user_exists(params) then |
177 return false, "no-such-user"; | 177 return false, "no-such-user"; |
178 end | 178 end |
179 params.password = nil; | 179 local user, host = nodeprep(params.user), nameprep(params.host); |
180 | 180 |
181 return _M.adduser(params); | 181 return usermanager.delete_user(user, host); |
182 end | 182 end |
183 | 183 |
184 function getpid() | 184 function getpid() |
185 local pidfile = config.get("*", "core", "pidfile"); | 185 local pidfile = config.get("*", "core", "pidfile"); |
186 if not pidfile then | 186 if not pidfile then |