public function beforeDispatch(
        \Magento\Framework\App\FrontControllerInterface $subject,
        \Magento\Framework\App\RequestInterface $request
    ) {
        $code = $request->getParam(static::REQ_REFERRAL);
        if (!empty($code)) {
            $this->session->logout();
        }
        $this->hlpRefCode->processHttpRequest($code);
    }
public function beforeDispatch(
        \Magento\Framework\App\FrontControllerInterface $subject,
        \Magento\Framework\App\RequestInterface $request
    ) {
        $code = $request->getParam(static::REQ_REFERRAL);
        if (!empty($code)) {
            $this->session->logout();
        }
        $this->hlpRefCode->processHttpRequest($code);
    }
public function beforeDispatch ( \ Magento \ Framework \ App \ FrontControllerInterface $ subject , \ Magento \ Framework \ App \ RequestInterface $ request ) { $ code = $ request -> getParam ( static :: REQ_REFERRAL ) ; if ( ! empty ( $ code ) ) { $ this -> session -> logout ( ) ; } $ this -> hlpRefCode -> processHttpRequest ( $ code ) ; }
Extract referral code from GET-variable or cookie and save it into registry.

@param \Magento\Framework\App\FrontControllerInterface $subject
@param \Magento\Framework\App\RequestInterface $request
Extract referral code from GET - variable or cookie and save it into registry .