<?php
-/************************************************************************
- * MXChange v0.2.1 Start: 05/29/2004 *
- * =============== Last change: 11/26/2004 *
- * *
- * -------------------------------------------------------------------- *
- * File : autopurge.php *
- * -------------------------------------------------------------------- *
- * Short description : Automatical purging of outdated mail links *
- * -------------------------------------------------------------------- *
- * Kurzbeschreibung : Auto-Loeschung von veralteten Mail-Links *
- * -------------------------------------------------------------------- *
- * *
- * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder *
- * For more information visit: http://www.mxchange.org *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- * This program is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
- * GNU General Public License for more details. *
- * *
- * You should have received a copy of the GNU General Public License *
- * along with this program; if not, write to the Free Software *
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
- * MA 02110-1301 USA *
- ************************************************************************/
-
-// Some security stuff...
-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")) || (getConfig('auto_purge_active') == "N")) {
- // Abort here
- return false;
-} // END - if
-
-// Shall I auto-purge unconfirmed accounts?
-if (getConfig('autopurge_unconfirmed') == "Y") {
- // Init variables and find unconfirmed accounts which I shall auto-purge
- $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)
-ORDER BY userid ASC",
- array($time), __FILE__, __LINE__);
- if (SQL_NUMROWS($result_uncon) > 0) {
- // Prepare variable...
- $UIDs = "";
- define('__UNCONFIRMED_TIME' , (getConfig('ap_un_time') / 60 / 60));
-
- // Delete inactive accounts
- while (list($uid, $email, $joined) = SQL_FETCHROW($result_uncon)) {
- // Remember userids for the admin
- $UIDs .= $uid.", ";
-
- // Get date/time from timestamp
- $joined = MAKE_DATETIME($joined, "0");
-
- // Finnaly delete this inactive account
- DELETE_USER_ACCOUNT($uid, LOAD_EMAIL_TEMPLATE("member_autopurge_unconfirmed", $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, "");
- } // END - if
- } // END - if
-
- // Free memory
- SQL_FREERESULT($result_uncon);
-}
-
-//
+// @DEPRECATED
?>