You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cacert-webdb/scripts/removedead.php

29 lines
949 B
PHP

#!/usr/bin/php -q
<? /*
Copyright (C) 2004 by Duane Groth <duane_at_CAcert_dot_org>
This file is part of CAcert.
CAcert has been released under a CAcert Source License
which can be found included with these source files or can
be downloaded from the internet from the following address:
http://www.cacert.org/src-lic.php
CAcert is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the License for more details.
*/
include_once("../includes/mysql.php");
$query = "select * from `users` where `users`.`verified`=0 and
(UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(`users`.`created`)) >= 86400";
$res = mysql_query($query);
while($row = mysql_fetch_assoc($res))
{
echo $row['email']."\n";
mysql_query("delete from `email` where `memid`='".$row['id']."'");
mysql_query("delete from `users` where `id`='".$row['id']."'");
}
?>