private function exchangeAuthUser($id)
    {
        $storage = $this->auth->getStorage();
        $originalUserId = $storage->read();
        $this->auth->clearIdentity();
        $storage->write($id);

        if ($acl = $this->getAclPlugin()) {
            $acl->setUser($this->auth->getUser());
        }

        return $originalUserId;
    }
private function exchangeAuthUser($id)
    {
        $storage = $this->auth->getStorage();
        $originalUserId = $storage->read();
        $this->auth->clearIdentity();
        $storage->write($id);

        if ($acl = $this->getAclPlugin()) {
            $acl->setUser($this->auth->getUser());
        }

        return $originalUserId;
    }
private function exchangeAuthUser ( $ id ) { $ storage = $ this -> auth -> getStorage ( ) ; $ originalUserId = $ storage -> read ( ) ; $ this -> auth -> clearIdentity ( ) ; $ storage -> write ( $ id ) ; if ( $ acl = $ this -> getAclPlugin ( ) ) { $ acl -> setUser ( $ this -> auth -> getUser ( ) ) ; } return $ originalUserId ; }
Exchanges the authenticated user in AuthenticationService.

@param string $id

@return string The id of the previously authenticated user.
Exchanges the authenticated user in AuthenticationService .