From: Tim Düsterhus Date: Tue, 2 Dec 2014 01:20:29 +0000 (+0100) Subject: Remove obsolete code in SessionHandler.class.php X-Git-Tag: 2.1.0_Beta_1~105^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e2ef1f24394af3d4260b861c8f4d052edd84a5dc;p=GitHub%2FWoltLab%2FWCF.git Remove obsolete code in SessionHandler.class.php --- diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index 7754748fb6..7f84b227e0 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -590,21 +590,6 @@ class SessionHandler extends SingletonFactory { return $this->changeUserVirtual($user); } - $sessionTable = call_user_func(array($this->sessionClassName, 'getDatabaseTableName')); - - if ($user->userID && !$hideSession) { - // user is not a guest, delete all other sessions of this user - $sql = "DELETE FROM ".$sessionTable." - WHERE sessionID <> ? - AND userID = ?"; - $statement = WCF::getDB()->prepareStatement($sql); - //$statement->execute(array($this->sessionID, $user->userID)); - - // reset session variables - $this->variables = array(); - $this->variablesChanged = true; - } - // update user reference $this->user = $user; @@ -621,6 +606,8 @@ class SessionHandler extends SingletonFactory { // MySQL error 23000 = unique key // do not check against the message itself, some weird systems localize them if ($e->getCode() == 23000) { + $sessionTable = call_user_func(array($this->sessionClassName, 'getDatabaseTableName')); + // user is not a guest, delete all other sessions of this user $sql = "DELETE FROM ".$sessionTable." WHERE sessionID <> ?