public function unsetAsCurrentUser($signalLoader = true)
    {
        // When $oldStore is a \Zend_Session_Namespace, then this user is already the current user.
        if ($this->isCurrentUser()) {
            // Get the current variables
            $oldStore = $this->_vars;

            $this->_vars = new \ArrayObject();
            $this->_vars->setFlags(\ArrayObject::STD_PROP_LIST);

            foreach ($oldStore as $name => $value) {
                $this->_vars->offsetSet($name, $value);
            }

            // Clean up what is there now in the session.
            $oldStore->unsetAll();

            if ($signalLoader) {
                // Signal the loader
                $this->userLoader->unsetCurrentUser();
            }
        }

        return $this;
    }
public function unsetAsCurrentUser($signalLoader = true)
    {
        // When $oldStore is a \Zend_Session_Namespace, then this user is already the current user.
        if ($this->isCurrentUser()) {
            // Get the current variables
            $oldStore = $this->_vars;

            $this->_vars = new \ArrayObject();
            $this->_vars->setFlags(\ArrayObject::STD_PROP_LIST);

            foreach ($oldStore as $name => $value) {
                $this->_vars->offsetSet($name, $value);
            }

            // Clean up what is there now in the session.
            $oldStore->unsetAll();

            if ($signalLoader) {
                // Signal the loader
                $this->userLoader->unsetCurrentUser();
            }
        }

        return $this;
    }
public function unsetAsCurrentUser ( $ signalLoader = true ) { // When $oldStore is a \Zend_Session_Namespace, then this user is already the current user. if ( $ this -> isCurrentUser ( ) ) { // Get the current variables $ oldStore = $ this -> _vars ; $ this -> _vars = new \ ArrayObject ( ) ; $ this -> _vars -> setFlags ( \ ArrayObject :: STD_PROP_LIST ) ; foreach ( $ oldStore as $ name => $ value ) { $ this -> _vars -> offsetSet ( $ name , $ value ) ; } // Clean up what is there now in the session. $ oldStore -> unsetAll ( ) ; if ( $ signalLoader ) { // Signal the loader $ this -> userLoader -> unsetCurrentUser ( ) ; } } return $ this ; }
Unsets this user as the current user.

This means that the data about this user will no longer be stored in a session.

@param boolean $signalLoader Do not set, except from UserLoader
@return \Gems_User_User (continuation pattern)
Unsets this user as the current user .