From: Tim Düsterhus Date: Wed, 30 Sep 2020 14:39:52 +0000 (+0200) Subject: Always enable virtual sessions X-Git-Tag: 5.4.0_Alpha_1~724^2~13^2~10 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=166d5161e976c7fe945d44ded9bf34d875e917b6;p=GitHub%2FWoltLab%2FWCF.git Always enable virtual sessions Virtual sessions will be removed shortly, making this commit technically useless. However it allows us to remove some code paths, allowing this future commit to be smaller. --- diff --git a/wcfsetup/install/files/lib/data/acp/session/ACPSession.class.php b/wcfsetup/install/files/lib/data/acp/session/ACPSession.class.php index 5cc9399bf8..28ce3e7458 100644 --- a/wcfsetup/install/files/lib/data/acp/session/ACPSession.class.php +++ b/wcfsetup/install/files/lib/data/acp/session/ACPSession.class.php @@ -35,16 +35,6 @@ class ACPSession extends DatabaseObject { return false; } - /** - * Returns true if this session type supports virtual sessions (sharing the same - * session among multiple clients). - * - * @return boolean - */ - public static function supportsVirtualSessions() { - return true; - } - /** * Returns the existing session object for given user id or null if there * is no such session. diff --git a/wcfsetup/install/files/lib/data/session/Session.class.php b/wcfsetup/install/files/lib/data/session/Session.class.php index 8974ebf53e..ead802977b 100644 --- a/wcfsetup/install/files/lib/data/session/Session.class.php +++ b/wcfsetup/install/files/lib/data/session/Session.class.php @@ -23,11 +23,4 @@ class Session extends ACPSession { public static function supportsPersistentLogins() { return true; } - - /** - * @inheritDoc - */ - public static function supportsVirtualSessions() { - return SESSION_ENABLE_VIRTUALIZATION ? true : false; - } } diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index 027131dee0..d525051078 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -117,12 +117,6 @@ class SessionHandler extends SingletonFactory { */ protected $sessionEditorClassName = ''; - /** - * virtual session support - * @var boolean - */ - protected $supportsVirtualSessions = false; - /** * style id * @var integer @@ -225,7 +219,6 @@ class SessionHandler extends SingletonFactory { public function load($sessionEditorClassName, $sessionID) { $this->sessionEditorClassName = $sessionEditorClassName; $this->sessionClassName = call_user_func([$sessionEditorClassName, 'getBaseClass']); - $this->supportsVirtualSessions = call_user_func([$this->sessionClassName, 'supportsVirtualSessions']); // try to get existing session if (!empty($sessionID)) { @@ -754,11 +747,6 @@ class SessionHandler extends SingletonFactory { // guest -> user (login) // default: - if (!$this->supportsVirtualSessions) { - // delete all other sessions of this user - call_user_func([$this->sessionEditorClassName, 'deleteUserSessions'], [$user->userID]); - } - // find existing session for this user $session = call_user_func([$this->sessionClassName, 'getSessionByUserID'], $user->userID);