setIdentity example


        $credential = $this->_credential;
        $credentialColumn = $this->_credentialColumn;
        $identity = $this->_identity;
        $identityColumn = $this->_identityColumn;
        $credentialTreatment = $this->_credentialTreatment;

        $expiry = Zend_Date::now()->subSecond($this->expiry);
        $this->setCredential($expiry);
        $this->setCredentialColumn($this->expiryColumn);

        $this->setIdentity($this->sessionId);
        $this->setIdentityColumn($this->sessionIdColumn);

        $result = parent::authenticate();

        $this->_credential = $credential;
        $this->_credentialColumn = $credentialColumn;
        $this->_identity = $identity;
        $this->_identityColumn = $identityColumn;
        $this->_credentialTreatment = $credentialTreatment;

        if ($result->isValid()) {
            

    public function login($username$password)
    {
        $result = null;
        $adapters = $this->getAdapter();
        foreach ($adapters as $adapter) {
            $adapter->setIdentity($username);
            $adapter->setCredential($password);

            $result = $this->authenticate($adapter);
            if ($result->isValid()) {
                $this->setBaseAdapter($adapter);

                return $result;
            }
        }
        $this->setBaseAdapter(null);

        
Home | Imprint | This part of the site doesn't use cookies.