diff options
author | Kim Alvefur <zash@zash.se> | 2012-08-25 01:31:49 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-08-25 01:31:49 +0200 |
commit | 9ecbf710489d937e2c59bfd1a2cebca8ae0fc610 (patch) | |
tree | 6393147d4725741bf5648a626f31c264b7fd4c01 /plugins | |
parent | d245a50c13fc0294edfe339f1402a4ed014021e5 (diff) | |
download | prosody-9ecbf710489d937e2c59bfd1a2cebca8ae0fc610.tar.gz prosody-9ecbf710489d937e2c59bfd1a2cebca8ae0fc610.zip |
mod_admin_adhoc: Use usermanager.delete_user to delete users
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_admin_adhoc.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_admin_adhoc.lua b/plugins/mod_admin_adhoc.lua index a6cf78cf..a13c7312 100644 --- a/plugins/mod_admin_adhoc.lua +++ b/plugins/mod_admin_adhoc.lua @@ -14,6 +14,7 @@ local iterators = require "util.iterators"; local keys, values = iterators.keys, iterators.values; local usermanager_user_exists = require "core.usermanager".user_exists; local usermanager_create_user = require "core.usermanager".create_user; +local usermanager_delete_user = require "core.usermanager".delete_user; local usermanager_get_password = require "core.usermanager".get_password; local usermanager_set_password = require "core.usermanager".set_password; local is_admin = require "core.usermanager".is_admin; @@ -142,7 +143,7 @@ function delete_user_command_handler(self, data, state) local succeeded = {}; for _, aJID in ipairs(fields.accountjids) do local username, host, resource = jid.split(aJID); - if (host == data.to) and usermanager_user_exists(username, host) and disconnect_user(aJID) and usermanager_create_user(username, nil, host) then + if (host == data.to) and usermanager_user_exists(username, host) and usermanager_delete_user(username, host) then module:log("debug", "User %s has been deleted", aJID); succeeded[#succeeded+1] = aJID; else |