From 8de8661653ae8611a81e7402f781c275c130b639 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 29 Mar 2019 14:20:00 +0100 Subject: [PATCH] Improve readability of SessionHandler::deleteIfNew() --- .../files/lib/system/session/SessionHandler.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index f70c52f17d..e65eb82e7c 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -1002,10 +1002,9 @@ class SessionHandler extends SingletonFactory { * @since 5.2 */ public function deleteIfNew() { - if (!$this->isFirstVisit()) return; - if ($this->getUser()->userID) return; - - $this->delete(); + if ($this->isFirstVisit() && !$this->getUser()->userID) { + $this->delete(); + } } /** -- 2.20.1