--- a/plugins/mod_user_account_management.lua Tue Dec 05 11:39:11 2023 +0000
+++ b/plugins/mod_user_account_management.lua Thu Dec 07 12:08:01 2023 +0000
@@ -171,6 +171,12 @@
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()