/** * Remove a permission from system * * @param integer $ID * permission id * @param boolean $Recursive * delete all descendants * */ function Remove($ID, $Recursive = false) { $this->UnassignRoles($ID); if (!$Recursive) { return $this->permissions->DeleteConditional("ID=?", $ID); } else { return $this->permissions->DeleteSubtreeConditional("ID=?", $ID); } }
/** * Remove roles from system * * @param integer $ID * role id * @param boolean $Recursive * delete all descendants * */ function remove($ID, $Recursive = false) { $this->unassignPermissions($ID); $this->unassignUsers($ID); if (!$Recursive) { return $this->roles->deleteConditional("ID=?", $ID); } else { return $this->roles->deleteSubtreeConditional("ID=?", $ID); } }