When deleting acl for an account, remove grants to the account as well

This commit is contained in:
Nathan Gray 2015-12-04 20:30:09 +00:00
parent 9117771ea2
commit ebb669dccf

View File

@ -762,9 +762,14 @@ class acl
{ {
if ((int) $account_id) if ((int) $account_id)
{ {
// Delete all grants from this account
$this->db->delete(acl::TABLE,array( $this->db->delete(acl::TABLE,array(
'acl_account' => $account_id 'acl_account' => $account_id
),__LINE__,__FILE__); ),__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) // delete all memberships in account_id (if it is a group)
$this->db->delete(acl::TABLE,array( $this->db->delete(acl::TABLE,array(
'acl_appname' => 'phpgw_group', 'acl_appname' => 'phpgw_group',