getResultRowObject example


    public function authenticate(?Zend_Auth_Adapter_Interface $adapter = null)
    {
        if ($adapter == null) {
            $adapter = $this->_adapter;
        }
        $result = parent::authenticate($adapter);

        if ($result->isValid() && method_exists($adapter, 'getResultRowObject')) {
            $user = $adapter->getResultRowObject();
            if (\is_object($user)) {
                $this->getStorage()->write($user);
            }
        } else {
            $this->getStorage()->clear();
        }

        return $result;
    }

    /** * Refreshes the auth object * * @return Zend_Auth_Result */


    /** * @return void */
    protected function updateExpiry()
    {
        if ($this->expiryColumn === null) {
            return;
        }

        $user = $this->getResultRowObject();
        if (!\is_object($user)) {
            return;
        }

        $this->_zendDb->update(
            $this->_tableName,
            [$this->expiryColumn => Zend_Date::now()],
            $this->_zendDb->quoteInto(
                $this->_zendDb->quoteIdentifier($this->_identityColumn, true) . ' = ?',
                $user->username
            )
        );
Home | Imprint | This part of the site doesn't use cookies.