Remove obsolete SessionHandler::loadVirtualSession() method
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 2 Oct 2020 08:43:00 +0000 (10:43 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 2 Oct 2020 08:43:00 +0000 (10:43 +0200)
wcfsetup/install/files/lib/system/session/SessionHandler.class.php

index e54cd94586d0376c362d127f03f410e6ea7dfb9e..195e98d588980a65dc5430a8fa5928b58af2bde9 100644 (file)
@@ -431,42 +431,6 @@ class SessionHandler extends SingletonFactory {
                $this->user = new User($this->session->userID);
        }
        
-       /**
-        * Loads the virtual session object unless the user is not logged in or the session
-        * does not support virtual sessions. If there is no virtual session yet, it will be
-        * created on-the-fly.
-        * 
-        * @param       boolean         $forceReload
-        */
-       protected function loadVirtualSession($forceReload = false) {
-               if ($this->virtualSession === null || $forceReload) {
-                       $this->virtualSession = null;
-                       if ($this->isACP) {
-                               $virtualSessionAction = new ACPSessionVirtualAction([], 'create', ['data' => ['sessionID' => $this->session->sessionID]]);
-                       }
-                       else {
-                               $virtualSessionAction = new SessionVirtualAction([], 'create', ['data' => ['sessionID' => $this->session->sessionID]]);
-                       }
-                       
-                       try {
-                               $returnValues = $virtualSessionAction->executeAction();
-                               $this->virtualSession = $returnValues['returnValues'];
-                       }
-                       catch (DatabaseException $e) {
-                               // MySQL error 23000 = unique key
-                               // do not check against the message itself, some weird systems localize them
-                               if ($e->getCode() == 23000) {
-                                       if ($this->isACP) {
-                                               $this->virtualSession = ACPSessionVirtual::getExistingSession($this->session->sessionID);
-                                       }
-                                       else {
-                                               $this->virtualSession = SessionVirtual::getExistingSession($this->session->sessionID);
-                                       }
-                               }
-                       }
-               }
-       }
-       
        /**
         * Creates a new session.
         */