The hook_init has a couple of path that are excluded.
Right now this breaks services functionality. It would also be great if the list was configurable.
Here's my change
// Exclude from the redirect.
if ((arg(0) == 'session' && arg(1) == 'limit') || arg(0) == 'logout' || arg(0) == 'services') {
// Added 'services' path.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | session_limit-hook_session_limit_bypass-1190716-3.patch | 2.91 KB | johnennew |
| #2 | session_limit-hook_session_limit_bypass-1190716-7497862.patch | 3.42 KB | johnennew |
Comments
Comment #1
johnennew commentedMoving to head.
What is the problem with services? Why would services need different session limitation behaviour?
I do like the idea of this being configurable, potentially via a hook:
Comment #2
johnennew commentedI am changing this issue to feature request to add a hook called hook_session_limit_bypass. If someone thinks this module should provide the bypass on behalf of services please say so - I do not understand why services would need it.
Mechanism for doing this implemented in attached patch for review. Includes an api file.
Comment #3
johnennew commentedTests pass - committing to 7.x-2.x setting to 6.x-2.x for back port
Comment #4
johnennew commentedPatch for 6.x-2.x ready for review.
Comment #5
johnennew commentedTests pass! committed.