Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The current implementation is tightly linked with the default DB-based session handling. It would be good if the module could define an API it expects to allow it to work with alternate implementations like MongoDB sessions, where there is a feature request about this #1190620: Include something like session_limit.
Comments
Comment #1
crea CreditAttribution: crea commentedSubscribing
Comment #2
johnennew CreditAttribution: johnennew commentedThis has been around for about 2 years now with little direct support.
I can see how this could be achieved from the session_limit end. Practically this would be the same as the way the Drupal mail handler works;
1. an interface defining get/count/disconnect session functions.
2. An implementing class for SQL style functions
3. A variable which defines the class that should be instantiated at run time, the default value would be the SQL class
4. Other session handlers could then define their own concrete implementation of the interface and tell Drupal to use it by setting the variable specified in 3.
I'd be happy to look at the session_limit implementation of this in a new branch but would want some help with testing, ideally with someone else producing the mongo_session implementation at the same time to prove the API.
If you're interested, let me know!
Comment #3
johnennew CreditAttribution: johnennew commentedShould probably use the session_api module for basic api functionality ...
https://drupal.org/project/session_api
Comment #4
fgmBumping to 8.x since 7.x is now legacy.