source/Core/Session.php
protected function _isSwappedClient()
    {
        $blSwapped = false;
        $myUtilsServer = \OxidEsales\Eshop\Core\Registry::getUtilsServer();

        // check only for non search engines
        if (!\OxidEsales\Eshop\Core\Registry::getUtils()->isSearchEngine() && !$myUtilsServer->isTrustedClientIp() && !$this->_isValidRemoteAccessToken()) {
            $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

            // checking if session user agent matches actual
            $blSwapped = $this->_checkUserAgent($myUtilsServer->getServerVar('HTTP_USER_AGENT'), $this->getVariable('sessionagent'));
            if (!$blSwapped) {
                $blDisableCookieCheck = $myConfig->getConfigParam('blDisableCookieCheck');
                $blUseCookies = $this->_getSessionUseCookies();
                if (!$blDisableCookieCheck && $blUseCookies) {
                    $blSwapped = $this->_checkCookies($myUtilsServer->getOxCookie('sid_key'), $this->getVariable("sessioncookieisset"));
                }
            }
        }

        return $blSwapped;
    }
protected function _isSwappedClient()
    {
        $blSwapped = false;
        $myUtilsServer = \OxidEsales\Eshop\Core\Registry::getUtilsServer();

        // check only for non search engines
        if (!\OxidEsales\Eshop\Core\Registry::getUtils()->isSearchEngine() && !$myUtilsServer->isTrustedClientIp() && !$this->_isValidRemoteAccessToken()) {
            $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

            // checking if session user agent matches actual
            $blSwapped = $this->_checkUserAgent($myUtilsServer->getServerVar('HTTP_USER_AGENT'), $this->getVariable('sessionagent'));
            if (!$blSwapped) {
                $blDisableCookieCheck = $myConfig->getConfigParam('blDisableCookieCheck');
                $blUseCookies = $this->_getSessionUseCookies();
                if (!$blDisableCookieCheck && $blUseCookies) {
                    $blSwapped = $this->_checkCookies($myUtilsServer->getOxCookie('sid_key'), $this->getVariable("sessioncookieisset"));
                }
            }
        }

        return $blSwapped;
    }
protected function _isSwappedClient ( ) { $ blSwapped = false ; $ myUtilsServer = \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsServer ( ) ; // check only for non search engines if ( ! \ OxidEsales \ Eshop \ Core \ Registry :: getUtils ( ) -> isSearchEngine ( ) && ! $ myUtilsServer -> isTrustedClientIp ( ) && ! $ this -> _isValidRemoteAccessToken ( ) ) { $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; // checking if session user agent matches actual $ blSwapped = $ this -> _checkUserAgent ( $ myUtilsServer -> getServerVar ( 'HTTP_USER_AGENT' ) , $ this -> getVariable ( 'sessionagent' ) ) ; if ( ! $ blSwapped ) { $ blDisableCookieCheck = $ myConfig -> getConfigParam ( 'blDisableCookieCheck' ) ; $ blUseCookies = $ this -> _getSessionUseCookies ( ) ; if ( ! $ blDisableCookieCheck && $ blUseCookies ) { $ blSwapped = $ this -> _checkCookies ( $ myUtilsServer -> getOxCookie ( 'sid_key' ) , $ this -> getVariable ( "sessioncookieisset" ) ) ; } } } return $ blSwapped ; }
Saves various visitor parameters and compares with current data.
Returns true if any change is detected.
Using this method we can detect different visitor with same session id.

@return bool
Saves various visitor parameters and compares with current data . Returns true if any change is detected . Using this method we can detect different visitor with same session id .