From fde3ca0eaa32e005739fcd399c9ecf0bca1de817 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Sat, 15 Oct 2005 15:28:01 +0000 Subject: [PATCH] Cleanup summary should tell us how many users overall have been warned and are pending deletion after their 1 month warning period elapses --- cron/cleanup.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cron/cleanup.php b/cron/cleanup.php index 4321f1d..35fceb7 100644 --- a/cron/cleanup.php +++ b/cron/cleanup.php @@ -124,12 +124,19 @@ function notifyAdminsOfCleanupStart() /* events of the appdb */ function notifyAdminsOfCleanupExecution($usersWarned, $usersUnwarnedWithData, $usersDeleted, $usersWithData) { + /* retrieve the number of users that have been warned and are pending deletion */ + $sQuery = "select count(*) as count from user_list where inactivity_warned = 'true'"; + $hResult = query_appdb($sQuery); + $oRow = mysql_fetch_object($hResult); + $warnedUsers = $oRow->count; + $sSubject = "Cleanup script summary\r\n"; $sMsg = "Appdb cleanup cron script executed.\r\n"; $sMsg .= "Status\r\n"; $sMsg .= "--------------------------\r\n"; $sMsg .= "Users warned:".$usersWarned."\r\n"; $sMsg .= "Users we would warn, but don't because they have data associated:".$usersUnwarnedWithData."\r\n"; + $sMsg .= "Warned users pending deletion:".$warnedUsers."\r\n"; $sMsg .= "Users deleted:".$usersDeleted."\r\n"; $sMsg .= "Users pending deletion but have appdb data:".$usersWithData."\r\n"; $sEmail = get_notify_email_address_list(null, null); /* get list admins */