original_string: public function getAdapter()
      {
          if (empty($this->adapter)) {
              $user = $this->getUser();
              $sessionDataStored = $user->getAuthSession($this->providerKey);
              $hybridAuth = $this->getHybridAuth();
              if (!empty($sessionDataStored)) {
                  $hybridAuth->restoreSessionData($sessionDataStored);
              }
              $adapter = $hybridAuth->authenticate($this->providerKey);
              $sessionData    = $hybridAuth->getSessionData();
              if ($sessionData != $sessionDataStored) {
                  $user->updateAuthSession($this->providerKey, $sessionData);
              }
              $this->adapter = $adapter;
          }
          return $this->adapter;
      }
code: public function getAdapter()
      {
          if (empty($this->adapter)) {
              $user = $this->getUser();
              $sessionDataStored = $user->getAuthSession($this->providerKey);
              $hybridAuth = $this->getHybridAuth();
              if (!empty($sessionDataStored)) {
                  $hybridAuth->restoreSessionData($sessionDataStored);
              }
              $adapter = $hybridAuth->authenticate($this->providerKey);
              $sessionData    = $hybridAuth->getSessionData();
              if ($sessionData != $sessionDataStored) {
                  $user->updateAuthSession($this->providerKey, $sessionData);
              }
              $this->adapter = $adapter;
          }
          return $this->adapter;
      }
code_tokens: public function getAdapter ( ) { if ( empty ( $ this -> adapter ) ) { $ user = $ this -> getUser ( ) ; $ sessionDataStored = $ user -> getAuthSession ( $ this -> providerKey ) ; $ hybridAuth = $ this -> getHybridAuth ( ) ; if ( ! empty ( $ sessionDataStored ) ) { $ hybridAuth -> restoreSessionData ( $ sessionDataStored ) ; } $ adapter = $ hybridAuth -> authenticate ( $ this -> providerKey ) ; $ sessionData = $ hybridAuth -> getSessionData ( ) ; if ( $ sessionData != $ sessionDataStored ) { $ user -> updateAuthSession ( $ this -> providerKey , $ sessionData ) ; } $ this -> adapter = $ adapter ; } return $ this -> adapter ; }
docstring: everything relevant is happening here, included the interactive registration
  if the User already has a session, it is retrieved
docstring_tokens: everything relevant is happening here included the interactive registration if the User already has a session it is retrieved