Browse Source
Merge pull request #21739 from nextcloud/techdebt/14552/migrate-OC-initSession
Remove hook for initSession
pull/21745/head
Morris Jobke
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
2 additions and
8 deletions
-
lib/base.php
|
|
|
@ -419,14 +419,8 @@ class OC { |
|
|
|
$sessionName = OC_Util::getInstanceId(); |
|
|
|
|
|
|
|
try { |
|
|
|
// Allow session apps to create a custom session object
|
|
|
|
$useCustomSession = false; |
|
|
|
$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); |
|
|
|
} |
|
|
|
// set the session name to the instance id - which is unique
|
|
|
|
$session = new \OC\Session\Internal($sessionName); |
|
|
|
|
|
|
|
$cryptoWrapper = \OC::$server->getSessionCryptoWrapper(); |
|
|
|
$session = $cryptoWrapper->wrapSession($session); |
|
|
|
|