X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fautopurge%2Fpurge-unconfirmed.php;h=e6276a98ce45b01d22bdb21a140312622d31029e;hp=4929f2d97403ea1c9b596d9b6329f18fb39fa5b8;hb=aa1fa67e62e0d175d5d801becaea4362a5b50e2a;hpb=4001187f22197f55e5a1f211fc8defcc180f7c32 diff --git a/inc/autopurge/purge-unconfirmed.php b/inc/autopurge/purge-unconfirmed.php index 4929f2d974..e6276a98ce 100644 --- a/inc/autopurge/purge-unconfirmed.php +++ b/inc/autopurge/purge-unconfirmed.php @@ -1,7 +1,7 @@ 0) { // Prepare variable... - $UIDs = ""; - define('__UNCONFIRMED_TIME' , (getConfig('ap_un_time') / 60 / 60)); + $userids = ''; + $content['time'] = (getConfig('ap_unconfirmed_time') / 60 / 60); // Delete inactive accounts - while ($content = SQL_FETCHARRAY($result_uncon)) { + while ($row = SQL_FETCHARRAY($result_uncon)) { + // Merge both arrays + $content = merge_array($content, $row); + // Remember userids for the admin - $UIDs .= $content['userid'].", "; + $userids .= $content['userid'] . ', '; // Get date/time from timestamp - $content['joined'] = MAKE_DATETIME($content['joined'], "0"); + $content['joined'] = generateDateTime($content['joined'], 0); // Finnaly delete this inactive account - DELETE_USER_ACCOUNT($content['userid'], LOAD_EMAIL_TEMPLATE("member_autopurge_unconfirmed", $content['joined'], "")); + deleteUserAccount($content['userid'], loadEmailTemplate('member_autopurge_unconfirmed', $content, '')); } // END - while // Remove last comma - $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); + $userids = str_replace(', ', "\n", substr($userids, 0, -2)); // Send mail notification to admin - if (getConfig('ap_un_notify') == "Y") { - SEND_ADMIN_NOTIFICATION(getMessage('AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT'), "admin_autopurge_unconfirmed", $UIDs, ""); + if (getConfig('ap_un_notify') == 'Y') { + sendAdminNotification(getMessage('AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT'), 'admin_autopurge_unconfirmed', $userids); } // END - if } // END - if // Free memory SQL_FREERESULT($result_uncon); -} +} // END - if -// +// [EOF] ?>