source/Core/UtilsServer.php
public function setUserCookie($userName, $passwordHash, $shopId = null, $timeout = 31536000, $salt = User::USER_COOKIE_SALT)
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        $shopId = $shopId ?? $myConfig->getShopId();
        $sSslUrl = $myConfig->getSslShopUrl();
        if (stripos($sSslUrl, 'https') === 0) {
            $blSsl = true;
        } else {
            $blSsl = false;
        }

        $this->_aUserCookie[$shopId] = $userName . '@@@' . crypt($passwordHash, $salt);
        $this->setOxCookie('oxid_' . $shopId, $this->_aUserCookie[$shopId], \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime() + $timeout, '/', null, true, $blSsl);
        $this->setOxCookie('oxid_' . $shopId . '_autologin', '1', \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime() + $timeout, '/', null, true, false);
    }
public function setUserCookie($userName, $passwordHash, $shopId = null, $timeout = 31536000, $salt = User::USER_COOKIE_SALT)
    {
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();
        $shopId = $shopId ?? $myConfig->getShopId();
        $sSslUrl = $myConfig->getSslShopUrl();
        if (stripos($sSslUrl, 'https') === 0) {
            $blSsl = true;
        } else {
            $blSsl = false;
        }

        $this->_aUserCookie[$shopId] = $userName . '@@@' . crypt($passwordHash, $salt);
        $this->setOxCookie('oxid_' . $shopId, $this->_aUserCookie[$shopId], \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime() + $timeout, '/', null, true, $blSsl);
        $this->setOxCookie('oxid_' . $shopId . '_autologin', '1', \OxidEsales\Eshop\Core\Registry::getUtilsDate()->getTime() + $timeout, '/', null, true, false);
    }
public function setUserCookie ( $ userName , $ passwordHash , $ shopId = null , $ timeout = 31536000 , $ salt = User :: USER_COOKIE_SALT ) { $ myConfig = \ OxidEsales \ Eshop \ Core \ Registry :: getConfig ( ) ; $ shopId = $ shopId ?? $ myConfig -> getShopId ( ) ; $ sSslUrl = $ myConfig -> getSslShopUrl ( ) ; if ( stripos ( $ sSslUrl , 'https' ) === 0 ) { $ blSsl = true ; } else { $ blSsl = false ; } $ this -> _aUserCookie [ $ shopId ] = $ userName . '@@@' . crypt ( $ passwordHash , $ salt ) ; $ this -> setOxCookie ( 'oxid_' . $ shopId , $ this -> _aUserCookie [ $ shopId ] , \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsDate ( ) -> getTime ( ) + $ timeout , '/' , null , true , $ blSsl ) ; $ this -> setOxCookie ( 'oxid_' . $ shopId . '_autologin' , '1' , \ OxidEsales \ Eshop \ Core \ Registry :: getUtilsDate ( ) -> getTime ( ) + $ timeout , '/' , null , true , false ) ; }
Sets user info into cookie

@param string  $userName     user name
@param string  $passwordHash password hash
@param int     $shopId       shop ID (default null)
@param integer $timeout      timeout value (default 31536000)
@param string  $salt
Sets user info into cookie