Anonymous session Toolkit
60 sites
No security coverage
Drupal 8–11
This module ensures that anonymous users have a reliable session available for features that depend on session data. It provides a service that can be called to initialize an anonymous session before it's used.
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()
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 1.0.3 | Stable | 8–11 | Drupal 11 support | Mar 24, 2025 |