<?php
-/************************************************************************
- * Mailer v0.2.1-FINAL 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 *
- * -------------------------------------------------------------------- *
- * $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 - 2009 by Roland Haeder *
- * Copyright (c) 2009, 2010 by Mailer Developer Team *
- * 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')) {
- die();
-} // END - if
-
-// Abort if autopurge is not active or disabled by admin
-if ((!isExtensionActive('autopurge')) || (!isAutoPurgingActive())) {
- // 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;
- $result_uncon = SQL_QUERY("SELECT
- `userid`, `email`, `joined`
-FROM
- `{?_MYSQL_PREFIX?}_user_data`
-WHERE
- `status`='UNCONFIRMED' AND `joined` < (UNIX_TIMESTAMP() - {?ap_unconfirmed_time?})
-ORDER BY
- `userid` ASC", __FILE__, __LINE__);
- if (SQL_NUMROWS($result_uncon) > 0) {
- // Prepare variable...
- $userids = '';
- $content['time'] = (getConfig('ap_unconfirmed_time') / 60 / 60);
-
- // Delete inactive accounts
- while ($row = SQL_FETCHARRAY($result_uncon)) {
- // Merge both arrays
- $content = merge_array($content, $row);
-
- // Remember userids for the admin
- $userids .= $content['userid'] . ', ';
-
- // Get date/time from timestamp
- $content['joined'] = generateDateTime($content['joined'], 0);
-
- // Finnaly delete this inactive account
- deleteUserAccount($content['userid'], loadEmailTemplate('member_autopurge_unconfirmed', $content, ''));
- } // END - while
-
- // Remove last comma
- $userids = str_replace(', ', "\n", substr($userids, 0, -2));
-
- // Send mail notification to admin
- if (getConfig('ap_un_notify') == 'Y') {
- sendAdminNotification('{--ADMIN_AUTOPURGE_UNCONFIRMED_SUBJECT--}', 'admin_autopurge_unconfirmed', $userids);
- } // END - if
- } // END - if
-
- // Free memory
- SQL_FREERESULT($result_uncon);
-} // END - if
-
-// [EOF]
+// @DEPRECATED
?>