Remove useless condition in SessionHandler::create()
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 1 Oct 2020 09:37:35 +0000 (11:37 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 1 Oct 2020 10:03:38 +0000 (12:03 +0200)
This condition always was true since the removal of the legacy autologin in
commit 95953c7a4b18c70d569c4bafc9de2726a1727ef9.

wcfsetup/install/files/lib/system/session/SessionHandler.class.php

index c61ce3e339e91bc0aa1fa06ecfe418dba3212919..1d9cc8d3631d4750e6af19d6b9e451ed8dd288e0 100644 (file)
@@ -542,18 +542,7 @@ class SessionHandler extends SingletonFactory {
                // create new session hash
                $sessionID = bin2hex(\random_bytes(20));
                
-               $this->user = null;
-               
-               // create user
-               if ($this->user === null) {
-                       // no valid user found
-                       // create guest user
-                       $this->user = new User(null);
-               }
-               else if (!$this->supportsVirtualSessions) {
-                       // delete all other sessions of this user
-                       call_user_func([$this->sessionEditorClassName, 'deleteUserSessions'], [$this->user->userID]);
-               }
+               $this->user = new User(null);
                
                $createNewSession = true;
                // find existing session