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);