protected function modifyWithUserRegistrationAction($user)
    {
        $errorCode = Registry::getRequest()->getRequestEscapedParameter('newslettererror');
        $successCode = Registry::getRequest()->getRequestEscapedParameter('success');

        if ($errorCode && $errorCode < 0) {
            $this->activePageEntity->setRegisteredUserId($user ? md5($user->getId()) : 'NULL');
            $this->activePageEntity->setRegisteredUserResult(abs($errorCode));
        }

        if ($successCode && $successCode > 0 && $user) {
            $this->activePageEntity->setRegisteredUserId(md5($user->getId()));
            $this->activePageEntity->setRegisteredUserResult(0);

            $this->activePageEntity->setLoginUserId($this->activeUserDataProvider->getActiveUserHashedId());
            $this->activePageEntity->setLoginResult($this->activeUserDataProvider->isLoaded() ? 0 : 1);
        }
    }