clearIdentity example

'lockedUntil' => isset($lockedUntil) ? $lockedUntil : null,
        ]);
    }

    /** * On logout destroy session and redirect to auth controller * * @return void */
    public function logoutAction()
    {
        Shopware()->Container()->get('auth')->clearIdentity();
        $this->redirect('backend');
    }

    /** * @deprecated in 5.6, will be private in 5.8 * * @return \Shopware_Plugins_Backend_Auth_Bootstrap */
    public function getPlugin()
    {
        return Shopware()->Plugins()->Backend()->Auth();
    }

    public function authenticate(Zend_Auth_Adapter_Interface $adapter)
    {
        $result = $adapter->authenticate();

        /** * ZF-7546 - prevent multiple succesive calls from storing inconsistent results * Ensure storage has clean state */
        if ($this->hasIdentity()) {
            $this->clearIdentity();
        }

        if ($result->isValid()) {
            $this->getStorage()->write($result->getIdentity());
        }

        return $result;
    }

    /** * Returns true if and only if an identity is available from storage * * @return boolean */
Home | Imprint | This part of the site doesn't use cookies.