Cleanup summary should tell us how many users overall have been warned and are pending deletion after their 1 month warning period elapses

This commit is contained in:
Chris Morgan
2005-10-15 15:28:01 +00:00
committed by WineHQ
parent 1c4e7d316f
commit fde3ca0eaa

View File

@@ -124,12 +124,19 @@ function notifyAdminsOfCleanupStart()
/* events of the appdb */ /* events of the appdb */
function notifyAdminsOfCleanupExecution($usersWarned, $usersUnwarnedWithData, $usersDeleted, $usersWithData) 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"; $sSubject = "Cleanup script summary\r\n";
$sMsg = "Appdb cleanup cron script executed.\r\n"; $sMsg = "Appdb cleanup cron script executed.\r\n";
$sMsg .= "Status\r\n"; $sMsg .= "Status\r\n";
$sMsg .= "--------------------------\r\n"; $sMsg .= "--------------------------\r\n";
$sMsg .= "Users warned:".$usersWarned."\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 .= "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 deleted:".$usersDeleted."\r\n";
$sMsg .= "Users pending deletion but have appdb data:".$usersWithData."\r\n"; $sMsg .= "Users pending deletion but have appdb data:".$usersWithData."\r\n";
$sEmail = get_notify_email_address_list(null, null); /* get list admins */ $sEmail = get_notify_email_address_list(null, null); /* get list admins */