X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fautopurge%2Fpurge-unconfirmed.php;h=2471dfcf278ad3ff9e35f1b8a739eedd7e336083;hb=f9a9c09e1ae257449bfd98f8854e321efba1dc3c;hp=dd6c7fedeee0b5e9cde1b8c60c21fd1c971c5231;hpb=3e64a94e122e30dd66db07fd8c8cfae05871c460;p=mailer.git diff --git a/inc/autopurge/purge-unconfirmed.php b/inc/autopurge/purge-unconfirmed.php index dd6c7fedee..2471dfcf27 100644 --- a/inc/autopurge/purge-unconfirmed.php +++ b/inc/autopurge/purge-unconfirmed.php @@ -32,21 +32,21 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { +if (!defined('__SECURITY')) { $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")) || ($_CONFIG['auto_purge_active'] == "N")) { +if ((!EXT_IS_ACTIVE("autopurge")) || (getConfig('auto_purge_active') == "N")) { // Abort here return false; } // END - if // Shall I auto-purge unconfirmed accounts? -if ($_CONFIG['ap_unconfirmed'] == "Y") { +if (getConfig('autopurge_unconfirmed') == "Y") { // Init variables and find unconfirmed accounts which I shall auto-purge - $time = bigintval($_CONFIG['ap_un_time']); + $time = bigintval(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) @@ -55,7 +55,7 @@ ORDER BY userid ASC", if (SQL_NUMROWS($result_uncon) > 0) { // Prepare variable... $UIDs = ""; - define('__UNCONFIRMED_TIME' , ($_CONFIG['ap_un_time'] / 60 / 60)); + define('__UNCONFIRMED_TIME' , (getConfig('ap_un_time') / 60 / 60)); // Delete inactive accounts while (list($uid, $email, $joined) = SQL_FETCHROW($result_uncon)) { @@ -73,7 +73,7 @@ ORDER BY userid ASC", $UIDs = str_replace(", ", "\n", substr($UIDs, 0, -2)); // Send mail notification to admin - if ($_CONFIG['ap_un_mail'] == "Y") { + if (getConfig('ap_un_notify') == "Y") { SEND_ADMIN_NOTIFICATION(AUTOPURGE_ADMIN_UNCONFIRMED_SUBJECT, "admin_autopurge_unconfirmed", $UIDs, ""); } // END - if } // END - if