mirror of
https://github.com/bjc/prosody.git
synced 2025-04-01 20:27:39 +03:00
mod_user_account_management: Clear pending deletion if account re-enabled
This commit is contained in:
parent
c35307551b
commit
39d85bbc31
1 changed files with 6 additions and 0 deletions
|
@ -171,6 +171,12 @@ function restore_account(username)
|
|||
return true, "Account restored";
|
||||
end
|
||||
|
||||
-- Automatically clear pending deletion if an account is re-enabled
|
||||
module:context("*"):hook("user-enabled", function (event)
|
||||
if event.host ~= module.host then return; end
|
||||
deleted_accounts:set(event.username, nil);
|
||||
end);
|
||||
|
||||
local cleanup_time = module:measure("cleanup", "times");
|
||||
|
||||
function cleanup_soft_deleted_accounts()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue