From 5464f4791e67da29619e83ed395fb7e0fee542aa Mon Sep 17 00:00:00 2001 From: mattf Date: Fri, 16 Nov 2007 21:30:28 +0000 Subject: [PATCH] fixed bug where vicidial_campaign_agents and inbound_agents records would not be deleted when user record was deleted: admin.php git-svn-id: svn://192.168.202.10@721 3d104415-ff17-0410-8863-d5cf3c621b8a --- agc_2-X/trunk/www/vicidial/admin.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php index 1d9a67fc..46fe8bc9 100644 --- a/agc_2-X/trunk/www/vicidial/admin.php +++ b/agc_2-X/trunk/www/vicidial/admin.php @@ -7686,14 +7686,20 @@ if ($ADD==6) } else { - $stmt="DELETE from vicidial_users where user='$user' limit 1;"; + $stmtA="DELETE from vicidial_users where user='$user' limit 1;"; + $rslt=mysql_query($stmtA, $link); + + $stmt="DELETE from vicidial_campaign_agents where user='$user';"; + $rslt=mysql_query($stmt, $link); + + $stmt="DELETE from vicidial_inbound_group_agents where user='$user';"; $rslt=mysql_query($stmt, $link); ### LOG CHANGES TO LOG FILE ### if ($WeBRooTWritablE > 0) { $fp = fopen ("./admin_changes_log.txt", "a"); - fwrite ($fp, "$date|!!!DELETING USER!!!!|$PHP_AUTH_USER|$ip|user='$user'|\n"); + fwrite ($fp, "$date|!!!DELETING USER!!!!|$PHP_AUTH_USER|$ip|$user|$stmtA|$stmt|\n"); fclose($fp); } echo "
USER DELETION COMPLETED: $user\n";