From 26604e9ae7b03767ffee2d778104abd198886ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 23 May 2013 22:43:37 +0200 Subject: [PATCH] Fix Room::canEnter() and Room::canWrite() for guests --- file/lib/data/room/Room.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/file/lib/data/room/Room.class.php b/file/lib/data/room/Room.class.php index ac48838..085a252 100644 --- a/file/lib/data/room/Room.class.php +++ b/file/lib/data/room/Room.class.php @@ -38,6 +38,7 @@ public function __toString() { */ public function canEnter(\wcf\data\user\User $user = null) { if ($user === null) $user = WCF::getUser(); + if (!$user->userID) return false; $ph = new \chat\system\permission\PermissionHandler($user); $suspensions = Suspension::getSuspensionsForUser($user); @@ -68,6 +69,7 @@ public function canEnter(\wcf\data\user\User $user = null) { */ public function canWrite(\wcf\data\user\User $user = null) { if ($user === null) $user = WCF::getUser(); + if (!$user->userID) return false; $ph = new \chat\system\permission\PermissionHandler($user); $suspensions = Suspension::getSuspensionsForUser($user);