Assign the user that created the contact to the user that created it. When deleting a contact delete the user assigned to it.

This commit is contained in:
markjcrane
2016-01-17 16:16:51 -07:00
parent 1c59453952
commit e9d8605c0d
2 changed files with 128 additions and 128 deletions
+9 -1
View File
@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -106,6 +106,14 @@ if (strlen($contact_uuid) > 0) {
$prep_statement->execute();
unset($prep_statement, $sql);
//delete contact users
$sql = "delete from v_contact_users ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
$sql .= "and contact_uuid = '".$contact_uuid."' ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
unset($prep_statement, $sql);
//delete contact groups
$sql = "delete from v_contact_groups ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";