owncloud/core — pull request #8557 by ringmaster (2014-05-12 15:20:12+00:00)
Title: Allow apps to create custom session handlers.

Provides an implementation for #7338.

Apps with a type of "session" will now be loaded before `session_start()`. The opportunity to replace the session object that ownCloud uses is provided by the hook OC::initSession, which provides three values by reference:

**session**
The initial `\OC\Session\Memory` session instance, which can be replaced with a custom object from the app.
**sessionName**
A string that holds the name of the session to use, usually from the session cookie.
**useCustomSession**
Boolean, false by default. If set to true, the value of the session parameter will be used as the session object, and not overwritten with a new `\OC\Session\Internal` object.

If no custom session implementation is provided by an app, ownCloud's sessions continue to function as they always have.