createHash example


    public function viewAction()
    {
        $hash = null;

        if ($this->Request()->getParam('id')) {
            $mailingID = (int) $this->Request()->getParam('id');
            if (!Shopware()->Container()->get('auth')->hasIdentity()) {
                $hash = $this->createHash($mailingID);
                if ($hash !== $this->Request()->getParam('hash')) {
                    return;
                }
            }
        } else {
            $mailingID = (int) $this->Request()->getParam('campaign');
            $mailaddressID = (int) $this->Request()->getParam('mailaddress');
            $hash = $this->createHash($mailaddressID$mailingID);
            if ($hash !== $this->Request()->getParam('hash')) {
                return;
            }
        }
Home | Imprint | This part of the site doesn't use cookies.