X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fautopurge%2Fpurge-unconfirmed.php;h=a31d7b6ef6fa8f76e79cb949c33f16038cd84ce8;hb=525510c6f6ee4798619dba6236c6b6d85263ac22;hp=2471dfcf278ad3ff9e35f1b8a739eedd7e336083;hpb=f9a9c09e1ae257449bfd98f8854e321efba1dc3c;p=mailer.git diff --git a/inc/autopurge/purge-unconfirmed.php b/inc/autopurge/purge-unconfirmed.php index 2471dfcf27..a31d7b6ef6 100644 --- a/inc/autopurge/purge-unconfirmed.php +++ b/inc/autopurge/purge-unconfirmed.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Auto-Loeschung von veralteten Mail-Links * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -33,48 +38,48 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } // END - if // Abort if autopurge is not active or disabled by admin -if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') == "N")) { +if ((!EXT_IS_ACTIVE('autopurge')) || (getConfig('auto_purge_active') != 'Y')) { // Abort here return false; } // END - if // Shall I auto-purge unconfirmed accounts? -if (getConfig('autopurge_unconfirmed') == "Y") { +if (getConfig('autopurge_unconfirmed') == 'Y') { // Init variables and find unconfirmed accounts which I shall auto-purge - $time = bigintval(getConfig('ap_un_time')); + $time = getConfig(('ap_un_time')); $result_uncon = SQL_QUERY_ESC("SELECT userid, email, joined -FROM "._MYSQL_PREFIX."_user_data -WHERE status='UNCONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s) +FROM `{!_MYSQL_PREFIX!}_user_data` +WHERE `status`='UNCONFIRMED' AND joined < (UNIX_TIMESTAMP() - %s) ORDER BY userid ASC", - array($time), __FILE__, __LINE__); + array($time), __FILE__, __LINE__); if (SQL_NUMROWS($result_uncon) > 0) { // Prepare variable... - $UIDs = ""; + $UIDs = ''; define('__UNCONFIRMED_TIME' , (getConfig('ap_un_time') / 60 / 60)); // Delete inactive accounts - while (list($uid, $email, $joined) = SQL_FETCHROW($result_uncon)) { + while ($content = SQL_FETCHARRAY($result_uncon)) { // Remember userids for the admin - $UIDs .= $uid.", "; + $UIDs .= $content['userid'].", "; // Get date/time from timestamp - $joined = MAKE_DATETIME($joined, "0"); + $content['joined'] = generateDateTime($content['joined'], '0'); // Finnaly delete this inactive account - DELETE_USER_ACCOUNT($uid, LOAD_EMAIL_TEMPLATE("member_autopurge_unconfirmed", $joined, "")); + deleteUserAccount($content['userid'], LOAD_EMAIL_TEMPLATE("member_autopurge_unconfirmed", $content['joined'], '')); } // END - while // Remove last comma $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); // Send mail notification to admin - if (getConfig('ap_un_notify') == "Y") { - SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT, "admin_autopurge_unconfirmed", $UIDs, ""); + if (getConfig('ap_un_notify') == 'Y') { + sendAdminNotification(getMessage('AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT'), "admin_autopurge_unconfirmed", $UIDs, ''); } // END - if } // END - if