source/Application/Model/NewsSubscribed.php
protected function _update()
    {
        if (($this->_blWasSubscribed || $this->_blWasPreSubscribed) && !$this->oxnewssubscribed__oxdboptin->value) {
            // set unsubscription date
            $this->oxnewssubscribed__oxunsubscribed->setValue(date('Y-m-d H:i:s'));
            // 0001974 Same object can be called many times without requiring to renew date.
            // If so happens, it would have _aSkipSaveFields set to skip date field. So need to check and
            // release if _aSkipSaveFields are set for field oxunsubscribed.
            $aSkipSaveFieldsKeys = array_keys($this->_aSkipSaveFields, 'oxunsubscribed');
            foreach ($aSkipSaveFieldsKeys as $iSkipSaveFieldKey) {
                unset($this->_aSkipSaveFields[$iSkipSaveFieldKey]);
            }
        } else {
            // don't update date
            $this->_aSkipSaveFields[] = 'oxunsubscribed';
        }

        return parent::_update();
    }
protected function _update()
    {
        if (($this->_blWasSubscribed || $this->_blWasPreSubscribed) && !$this->oxnewssubscribed__oxdboptin->value) {
            // set unsubscription date
            $this->oxnewssubscribed__oxunsubscribed->setValue(date('Y-m-d H:i:s'));
            // 0001974 Same object can be called many times without requiring to renew date.
            // If so happens, it would have _aSkipSaveFields set to skip date field. So need to check and
            // release if _aSkipSaveFields are set for field oxunsubscribed.
            $aSkipSaveFieldsKeys = array_keys($this->_aSkipSaveFields, 'oxunsubscribed');
            foreach ($aSkipSaveFieldsKeys as $iSkipSaveFieldKey) {
                unset($this->_aSkipSaveFields[$iSkipSaveFieldKey]);
            }
        } else {
            // don't update date
            $this->_aSkipSaveFields[] = 'oxunsubscribed';
        }

        return parent::_update();
    }
protected function _update ( ) { if ( ( $ this -> _blWasSubscribed || $ this -> _blWasPreSubscribed ) && ! $ this -> oxnewssubscribed__oxdboptin -> value ) { // set unsubscription date $ this -> oxnewssubscribed__oxunsubscribed -> setValue ( date ( 'Y-m-d H:i:s' ) ) ; // 0001974 Same object can be called many times without requiring to renew date. // If so happens, it would have _aSkipSaveFields set to skip date field. So need to check and // release if _aSkipSaveFields are set for field oxunsubscribed. $ aSkipSaveFieldsKeys = array_keys ( $ this -> _aSkipSaveFields , 'oxunsubscribed' ) ; foreach ( $ aSkipSaveFieldsKeys as $ iSkipSaveFieldKey ) { unset ( $ this -> _aSkipSaveFields [ $ iSkipSaveFieldKey ] ) ; } } else { // don't update date $ this -> _aSkipSaveFields [ ] = 'oxunsubscribed' ; } return parent :: _update ( ) ; }
We need to check if we unsubscribe here

@return mixed oxid on success or false on failure
We need to check if we unsubscribe here