original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Exchanges the authenticated user in AuthenticationService.
  
  @param string $id
  
  @return string The id of the previously authenticated user.
docstring_tokens: Exchanges the authenticated user in AuthenticationService .