aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/usermanager.lua6
-rw-r--r--plugins/mod_auth_internal_hashed.lua3
2 files changed, 5 insertions, 4 deletions
diff --git a/core/usermanager.lua b/core/usermanager.lua
index 37fd38a9..793e7af6 100644
--- a/core/usermanager.lua
+++ b/core/usermanager.lua
@@ -163,12 +163,12 @@ local function enable_user(username, host)
return ret, err;
end
-local function disable_user(username, host)
+local function disable_user(username, host, meta)
local method = hosts[host].users.disable;
if not method then return nil, "method not supported"; end
- local ret, err = method(username);
+ local ret, err = method(username, meta);
if ret then
- prosody.events.fire_event("user-disabled", { username = username, host = host });
+ prosody.events.fire_event("user-disabled", { username = username, host = host, meta = meta });
end
return ret, err;
end
diff --git a/plugins/mod_auth_internal_hashed.lua b/plugins/mod_auth_internal_hashed.lua
index 32371618..4840f431 100644
--- a/plugins/mod_auth_internal_hashed.lua
+++ b/plugins/mod_auth_internal_hashed.lua
@@ -126,9 +126,10 @@ function provider.enable(username)
return accounts:set(username, account);
end
-function provider.disable(username)
+function provider.disable(username, meta)
local account = accounts:get(username);
account.disabled = true;
+ account.disabled_meta = meta;
account.updated = os.time();
return accounts:set(username, account);
end