Component/UserComponent.php
protected function _changeUser_noRedirect()
    {
        if (!$this->getSession()->checkSessionChallenge()) {
            return;
        }

        // no user ?
        $user = $this->getUser();
        if (!$user) {
            return;
        }

        $deliveryOptinValid = $this->validateDeliveryAddressOptIn();
        $invoiceOptinValid = $this->validateInvoiceAddressOptIn();

        if (false == $deliveryOptinValid) {
            \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay('OEGDPROPTIN_CONFIRM_STORE_DELIVERY_ADDRESS', false, true);
            \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay('OEGDPROPTIN_CONFIRM_STORE_DELIVERY_ADDRESS', false, true, 'oegdproptin_deliveryaddress');
        }
        if (false == $invoiceOptinValid) {
            \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay('OEGDPROPTIN_CONFIRM_STORE_INVOICE_ADDRESS', false, true);
            \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay('OEGDPROPTIN_CONFIRM_STORE_INVOICE_ADDRESS', false, true, 'oegdproptin_invoiceaddress');
        }

        $return = false;
        if ( (true == $deliveryOptinValid) && (true == $invoiceOptinValid)) {
            $return = parent::_changeUser_noRedirect();
        }

        return $return;
    }
protected function _changeUser_noRedirect()
    {
        if (!$this->getSession()->checkSessionChallenge()) {
            return;
        }

        // no user ?
        $user = $this->getUser();
        if (!$user) {
            return;
        }

        $deliveryOptinValid = $this->validateDeliveryAddressOptIn();
        $invoiceOptinValid = $this->validateInvoiceAddressOptIn();

        if (false == $deliveryOptinValid) {
            \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay('OEGDPROPTIN_CONFIRM_STORE_DELIVERY_ADDRESS', false, true);
            \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay('OEGDPROPTIN_CONFIRM_STORE_DELIVERY_ADDRESS', false, true, 'oegdproptin_deliveryaddress');
        }
        if (false == $invoiceOptinValid) {
            \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay('OEGDPROPTIN_CONFIRM_STORE_INVOICE_ADDRESS', false, true);
            \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\UtilsView::class)->addErrorToDisplay('OEGDPROPTIN_CONFIRM_STORE_INVOICE_ADDRESS', false, true, 'oegdproptin_invoiceaddress');
        }

        $return = false;
        if ( (true == $deliveryOptinValid) && (true == $invoiceOptinValid)) {
            $return = parent::_changeUser_noRedirect();
        }

        return $return;
    }
protected function _changeUser_noRedirect ( ) { if ( ! $ this -> getSession ( ) -> checkSessionChallenge ( ) ) { return ; } // no user ? $ user = $ this -> getUser ( ) ; if ( ! $ user ) { return ; } $ deliveryOptinValid = $ this -> validateDeliveryAddressOptIn ( ) ; $ invoiceOptinValid = $ this -> validateInvoiceAddressOptIn ( ) ; if ( false == $ deliveryOptinValid ) { \ OxidEsales \ Eshop \ Core \ Registry :: get ( \ OxidEsales \ Eshop \ Core \ UtilsView :: class ) -> addErrorToDisplay ( 'OEGDPROPTIN_CONFIRM_STORE_DELIVERY_ADDRESS' , false , true ) ; \ OxidEsales \ Eshop \ Core \ Registry :: get ( \ OxidEsales \ Eshop \ Core \ UtilsView :: class ) -> addErrorToDisplay ( 'OEGDPROPTIN_CONFIRM_STORE_DELIVERY_ADDRESS' , false , true , 'oegdproptin_deliveryaddress' ) ; } if ( false == $ invoiceOptinValid ) { \ OxidEsales \ Eshop \ Core \ Registry :: get ( \ OxidEsales \ Eshop \ Core \ UtilsView :: class ) -> addErrorToDisplay ( 'OEGDPROPTIN_CONFIRM_STORE_INVOICE_ADDRESS' , false , true ) ; \ OxidEsales \ Eshop \ Core \ Registry :: get ( \ OxidEsales \ Eshop \ Core \ UtilsView :: class ) -> addErrorToDisplay ( 'OEGDPROPTIN_CONFIRM_STORE_INVOICE_ADDRESS' , false , true , 'oegdproptin_invoiceaddress' ) ; } $ return = false ; if ( ( true == $ deliveryOptinValid ) && ( true == $ invoiceOptinValid ) ) { $ return = parent :: _changeUser_noRedirect ( ) ; } return $ return ; }
Mostly used for customer profile editing screen (OXID eShop ->
MY ACCOUNT). Checks if oUser is set (\OxidEsales\Eshop\Application\Component\UserComponent::oUser) - if
not - executes \OxidEsales\Eshop\Application\Component\UserComponent::_loadSessionUser(). If user unchecked newsletter
subscription option - removes him from this group. There is an
additional MUST FILL fields checking. Function returns true or false
according to user data submission status.

Session variables:
<b>ordrem</b>

@return  bool true on success, false otherwise
Mostly used for customer profile editing screen ( OXID eShop - > MY ACCOUNT ) . Checks if oUser is set ( \ OxidEsales \ Eshop \ Application \ Component \ UserComponent :: oUser ) - if not - executes \ OxidEsales \ Eshop \ Application \ Component \ UserComponent :: _loadSessionUser () . If user unchecked newsletter subscription option - removes him from this group . There is an additional MUST FILL fields checking . Function returns true or false according to user data submission status .