This project is not covered by Drupal’s security advisory policy.
Add a consistent way to the website to ensure a session for anonymous users for reliable session related functionality.
Include the service in your application where the session is important, and call the 'apply' method before using the session
$anonymousSession = \Drupal::service('anonymoussession');
$anonymousSession->apply();
// Use session variables:
//$_SESSION[...]
Use cases include:
- PrivateTempStore
- Functionality that depends on Drupal::currentRequest()->getSession()
Project information
Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed.Maintenance fixes only
Considered feature-complete by its maintainers.- Project categories: Developer tools
- Ecosystem: Custom Module Tools
49 sites report using this module
- Created by erlendoos on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.

