Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Would it be possible to add a feature where a new session will simply be rejected as long as the previous sessions exist? I am hoping to use this in conjunction with the Automated Logout to control how long the sessions can last. I dont want the users to even have the option to force an earlier session to be disconnected. They will simply have to wait until a session become available.
Is this possible? Thanks!
Comment | File | Size | Author |
---|---|---|---|
#2 | prevent-new-session-1310144-1.patch | 3.2 KB | Liam McDermott |
Comments
Comment #1
Liam McDermott CreditAttribution: Liam McDermott commentedAnd here's a patch!
Note: I had to use
session_destroy();
instead ofsession_limit_invoke_session_limit(session_id(), 'disconnect');
as the session would not properly be destroyed otherwise, and the user would still appear logged-in.Comment #2
Liam McDermott CreditAttribution: Liam McDermott commentedWould help if I attached the file! :)
Comment #3
RikiB CreditAttribution: RikiB commentedThis is perfect, it adds a 3rd options in the admin section which gives you the option to prevent new sessions once they are filled. Thanks Liam! :D
Comment #4
deekayen CreditAttribution: deekayen commentedcommitted
http://drupalcode.org/project/session_limit.git/commit/a0cbed9
Comment #6
marynz CreditAttribution: marynz commentedHi
thanks for this module and patch, was just what i needed - works great.
Is there a way to make sure user 1 doesn't get locked out? I found myself blocked - used the back button in the browser to get back to an admin page then and logged out and back in a couple of times before the log in was successful.
in the meantime ill use cleaner module to clear old sessions every time cron runs, that way at least i will eventually be able to log on again...
mary