MasterEvent->Prefix == 'u' ? 'PortalUserId' : 'ResourceId'; $table_name = $this->Application->getUnitOption($this->Prefix, 'TableName'); $object =& $event->MasterEvent->getObject(); $sql = 'DELETE FROM '.$table_name.' WHERE '.$key_field.' = '.$object->GetDBField($key_field); $this->Conn->Query($sql); } } ?>