diff --git a/src/Drupal/DrupalExtension/Manager/DrupalAuthenticationManager.php b/src/Drupal/DrupalExtension/Manager/DrupalAuthenticationManager.php index a6207eaf..49fede77 100644 --- a/src/Drupal/DrupalExtension/Manager/DrupalAuthenticationManager.php +++ b/src/Drupal/DrupalExtension/Manager/DrupalAuthenticationManager.php @@ -130,7 +130,10 @@ public function loggedIn() */ public function fastLogout() { - $this->getSession()->reset(); - $this->userManager->setCurrentUser(false); + $session = $this->getSession(); + if ($session->isStarted()) { + $session->reset(); + $this->userManager->setCurrentUser(FALSE); + } } }