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
This commit is contained in:
mattf
2007-11-16 21:30:28 +00:00
parent 13827f2022
commit fe2142ec25
+8 -2
View File
@@ -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 "<br><B>USER DELETION COMPLETED: $user</B>\n";