Changeset

5805:5621dece3ee4

mod_http_admin_api: Only include user deletion_request if account is disabled
author Matthew Wild <mwild1@gmail.com>
date Thu, 07 Dec 2023 15:30:41 +0000
parents 5804:cb25d341745f
children 5806:6c8cf3ecb885
files mod_http_admin_api/mod_http_admin_api.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_admin_api/mod_http_admin_api.lua	Thu Dec 07 15:30:01 2023 +0000
+++ b/mod_http_admin_api/mod_http_admin_api.lua	Thu Dec 07 15:30:41 2023 +0000
@@ -234,7 +234,7 @@
 		roles = legacy_roles; -- COMPAT w/0.12
 		enabled = enabled;
 		last_active = mod_lastlog2.get_last_active(username);
-		deletion_request = deleted_users:get(username);
+		deletion_request = not enabled and deleted_users:get(username) or nil;
 		avatar_info = get_user_avatar_info(username);
 	};
 end