Baikal\Model\User::destroy PHP Method

destroy() public method

public destroy ( )
    function destroy()
    {
        # TODO: delete all related resources (principals, calendars, calendar events, contact books and contacts)
        # Destroying identity principal
        $this->oIdentityPrincipal->destroy();
        $oCalendars = $this->getCalendarsBaseRequester()->execute();
        foreach ($oCalendars as $calendar) {
            $calendar->destroy();
        }
        $oAddressBooks = $this->getAddressBooksBaseRequester()->execute();
        foreach ($oAddressBooks as $addressbook) {
            $addressbook->destroy();
        }
        parent::destroy();
    }