original_string: public function logout()
      {
          $this->hook('logout');
  
          $this->model->unload();
  
          // maybe can use $this->app->destroySession() here instead?
          $this->forget('info');
          $this->forget('id');
  
          setcookie(session_name(), '', time() - 42000, '/');
          if (session_status() === PHP_SESSION_ACTIVE) {
              session_destroy();
          }
  
          $this->info = false;
  
          return $this;
      }
code: public function logout()
      {
          $this->hook('logout');
  
          $this->model->unload();
  
          // maybe can use $this->app->destroySession() here instead?
          $this->forget('info');
          $this->forget('id');
  
          setcookie(session_name(), '', time() - 42000, '/');
          if (session_status() === PHP_SESSION_ACTIVE) {
              session_destroy();
          }
  
          $this->info = false;
  
          return $this;
      }
code_tokens: public function logout ( ) { $ this -> hook ( 'logout' ) ; $ this -> model -> unload ( ) ; // maybe can use $this->app->destroySession() here instead? $ this -> forget ( 'info' ) ; $ this -> forget ( 'id' ) ; setcookie ( session_name ( ) , '' , time ( ) - 42000 , '/' ) ; if ( session_status ( ) === PHP_SESSION_ACTIVE ) { session_destroy ( ) ; } $ this -> info = false ; return $ this ; }
docstring: Manually log out user.
  
  @return $this
docstring_tokens: Manually log out user .