BxDolTwigModule::serviceDeleteProfileData PHP Method

serviceDeleteProfileData() public method

public serviceDeleteProfileData ( $iProfileId )
    function serviceDeleteProfileData($iProfileId)
    {
        $iProfileId = (int) $iProfileId;
        if (!$iProfileId) {
            return false;
        }
        // delete entries which belongs to particular author
        $aDataEntries = $this->_oDb->getEntriesByAuthor($iProfileId);
        foreach ($aDataEntries as $iEntryId) {
            if ($this->_oDb->deleteEntryByIdAndOwner($iEntryId, $iProfileId, false)) {
                $this->onEventDeleted($iEntryId);
            }
        }
        // delete from list of fans/admins
        $this->_oDb->removeFanFromAllEntries($iProfileId);
        $this->_oDb->removeAdminFromAllEntries($iProfileId);
    }

Usage Example

Ejemplo n.º 1
0
 function serviceDeleteProfileData($iProfileId)
 {
     parent::serviceDeleteProfileData($iProfileId);
     // delete from list of customers
     $this->_oDb->removeCustomersFromAllEntries($iProfileId);
 }