Activate shared sessions in the global configuration
Everything works as before
Extensions expecting the #__session table field as client_id = 0 or client_id = 1 fail because the field client_id is left NULL
Wouldn't be better to leave by default the client_id set as 0 when a shared session is started and mark it adding a new field to the #__session table? That would avoid the need to update all extensions to evaluate the field not only as 0 but even as NULL
Labels |
Added:
?
|
We decided to set it as NULL because client_id 0 implies the session is assigned specifically to the site application. It should be treated similarly to a foreign key in that the client_id if assigned matches directly with a Joomla application client and NULL if it is not bound.
The only parts of Joomla affected by this change are if you're creating a "who's online" feature or logout handlers. Beyond that there are few legitimate cases where direct reading of the session database table (and remember though it'll always have this extraneous session metadata that can't be turned off it won't always be the actual session's storage handler) should be considered.
can this be closed then?
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-01-11 13:58:21 |
Closed_By | ⇒ | Bakual |
Since it's basically a new feature, admins will have to make sure each extension supports it before using it. Same as for other new features.
Closing as expected behavior.
Should any extension check the #__sessions table direkt? Don't we have a api for that in JSession ?
https://github.com/joomla/joomla-cms/tree/staging/libraries/joomla/session
I'm not that familiar with that part of the Libs but I would expecte something there.
And if we set any value which should we use? If you query that table direkt we need both values there so nothing is won / changed in that game or do i miss something? ;)