Initial commit
This commit is contained in:
20
job_user_delete_neue_user.php
Normal file
20
job_user_delete_neue_user.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
require("config/datenbankanbindung.php"); // fügt die Datenbankanbindung ein: Sys:\php\includes\kurs\datenbankanbindung.php
|
||||
# http://www.cronjob.de/
|
||||
# netblack...de
|
||||
# 76.....
|
||||
$db = dbconnect();
|
||||
$result_abs = $db->query("SELECT user, vaid
|
||||
FROM admin
|
||||
WHERE user not in (select distinct uid from userlog)
|
||||
AND DATE_SUB(NOW(), INTERVAL 12 Month) > registriert
|
||||
AND DATE_SUB(NOW(), INTERVAL 30 DAY) > mail_inaktiv
|
||||
AND mail_inaktiv != '0000-00-00 00:00:00'
|
||||
AND inaktiv!='J'");
|
||||
|
||||
while ($row = $result_abs->fetch_array()){
|
||||
$sql = $db->query("DELETE FROM profil WHERE user='$row[user]'");
|
||||
$sql = $db->query("DELETE FROM admin_rollen_user_zuord WHERE vaid='$row[vaid]'");
|
||||
$sql = $db->query("DELETE FROM admin WHERE vaid='$row[vaid]'");
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user