removing all it's acl-rights if an account gets deleted, admin only removed the run-rights, but not the grants or other rights

This commit is contained in:
Ralf Becker 2004-08-07 12:46:58 +00:00
parent 25ba714000
commit 6b8f6a3d87
2 changed files with 16 additions and 0 deletions

View File

@ -368,6 +368,9 @@
{
$this->cache_invalidate($accountid);
accounts_::delete($accountid);
// delete all acl_entries belonging to that user or group
$GLOBALS['phpgw']->acl->delete($accountid);
}
function create($account_info,$default_prefs=True)

View File

@ -769,5 +769,18 @@
return $grants;
}
/**
* Deletes all ACL entries for an account (user or group)
*
* @param int $account_id acount-id
*/
function delete_account($account_id)
{
if ((int) $account_id)
{
$this->db->query('DELETE FROM phpgw_acl WHERE acl_account='.(int)$account_id,__LINE__,__FILE__);
}
}
} //end of acl class
?>