From 235c040a9e4cdfbb62fdf331f40df64cc549b192 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 27 Feb 2014 17:59:12 +0100 Subject: [PATCH] Fixed session delete (logout) issues --- .../lib/system/session/SessionHandler.class.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index 0291590032..14f431a787 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -1,6 +1,7 @@ user->userID) { + self::resetSessions(array($this->user->userID)); + + // update last activity time + if (!class_exists('\wcf\system\WCFACP', false)) { + $editor = new UserEditor($this->user); + $editor->update(array('lastActivityTime' => TIME_NOW)); + } + } + // set user to guest $this->changeUser(new User(null), true); @@ -566,11 +578,6 @@ class SessionHandler extends SingletonFactory { $sessionEditor = new $this->sessionEditorClassName($this->session); $sessionEditor->delete(); - // clear storage - if ($this->user->userID) { - self::resetSessions(array($this->user->userID)); - } - // disable update $this->disableUpdate(); } -- 2.20.1