source/Application/Controller/NewsletterController.php
public function addme()
    {
        // user exists ?
        $oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
        if ($oUser->load(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('uid'))) {
            $sConfirmCode = md5($oUser->oxuser__oxusername->value . $oUser->oxuser__oxpasssalt->value);
            // is confirm code ok?
            if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('confirm') == $sConfirmCode) {
                $oUser->getNewsSubscription()->setOptInStatus(1);
                $oUser->addToGroup('oxidnewsletter');
                $this->_iNewsletterStatus = 2;
            }
        }
    }
public function addme()
    {
        // user exists ?
        $oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
        if ($oUser->load(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('uid'))) {
            $sConfirmCode = md5($oUser->oxuser__oxusername->value . $oUser->oxuser__oxpasssalt->value);
            // is confirm code ok?
            if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('confirm') == $sConfirmCode) {
                $oUser->getNewsSubscription()->setOptInStatus(1);
                $oUser->addToGroup('oxidnewsletter');
                $this->_iNewsletterStatus = 2;
            }
        }
    }
public function addme ( ) { // user exists ? $ oUser = oxNew ( \ OxidEsales \ Eshop \ Application \ Model \ User :: class ) ; if ( $ oUser -> load ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'uid' ) ) ) { $ sConfirmCode = md5 ( $ oUser -> oxuser__oxusername -> value . $ oUser -> oxuser__oxpasssalt -> value ) ; // is confirm code ok? if ( \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) -> getRequestParameter ( 'confirm' ) == $ sConfirmCode ) { $ oUser -> getNewsSubscription ( ) -> setOptInStatus ( 1 ) ; $ oUser -> addToGroup ( 'oxidnewsletter' ) ; $ this -> _iNewsletterStatus = 2 ; } } }
Loads user and Adds him to newsletter group.

Template variables:
<b>success</b>
Loads user and Adds him to newsletter group .