From ebb669dccf56ec79c4de82d4d5e2c2485588474e Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Fri, 4 Dec 2015 20:30:09 +0000 Subject: [PATCH] When deleting acl for an account, remove grants to the account as well --- phpgwapi/inc/class.acl.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpgwapi/inc/class.acl.inc.php b/phpgwapi/inc/class.acl.inc.php index e7151ad4d9..68a14b44f9 100644 --- a/phpgwapi/inc/class.acl.inc.php +++ b/phpgwapi/inc/class.acl.inc.php @@ -762,9 +762,14 @@ class acl { if ((int) $account_id) { + // Delete all grants from this account $this->db->delete(acl::TABLE,array( 'acl_account' => $account_id ),__LINE__,__FILE__); + // Delete all grants to this account + $this->db->delete(acl::TABLE,array( + 'acl_location' => $account_id + ),__LINE__, __FILE__); // delete all memberships in account_id (if it is a group) $this->db->delete(acl::TABLE,array( 'acl_appname' => 'phpgw_group',