Merge pull request #21739 from nextcloud/techdebt/14552/migrate-OC-initSession
Remove hook for initSession
This commit is contained in:
commit
abe222c979
10
lib/base.php
10
lib/base.php
|
@ -419,14 +419,8 @@ class OC {
|
||||||
$sessionName = OC_Util::getInstanceId();
|
$sessionName = OC_Util::getInstanceId();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Allow session apps to create a custom session object
|
// set the session name to the instance id - which is unique
|
||||||
$useCustomSession = false;
|
$session = new \OC\Session\Internal($sessionName);
|
||||||
$session = self::$server->getSession();
|
|
||||||
OC_Hook::emit('OC', 'initSession', ['session' => &$session, 'sessionName' => &$sessionName, 'useCustomSession' => &$useCustomSession]);
|
|
||||||
if (!$useCustomSession) {
|
|
||||||
// set the session name to the instance id - which is unique
|
|
||||||
$session = new \OC\Session\Internal($sessionName);
|
|
||||||
}
|
|
||||||
|
|
||||||
$cryptoWrapper = \OC::$server->getSessionCryptoWrapper();
|
$cryptoWrapper = \OC::$server->getSessionCryptoWrapper();
|
||||||
$session = $cryptoWrapper->wrapSession($session);
|
$session = $cryptoWrapper->wrapSession($session);
|
||||||
|
|
Loading…
Reference in New Issue