From 96e835e73841fe9f9bc4af5053d93c423fb2614c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Sun, 27 Nov 2011 20:01:28 +0100 Subject: [PATCH] Hide PageMenuItem for guests They cannot view the page anyway ;) --- file/lib/system/menu/page/ChatPageMenuItemProvider.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/file/lib/system/menu/page/ChatPageMenuItemProvider.class.php b/file/lib/system/menu/page/ChatPageMenuItemProvider.class.php index 5979d61..1418f5a 100644 --- a/file/lib/system/menu/page/ChatPageMenuItemProvider.class.php +++ b/file/lib/system/menu/page/ChatPageMenuItemProvider.class.php @@ -17,6 +17,9 @@ class ChatPageMenuItemProvider extends DefaultPageMenuItemProvider { * @see wcf\system\menu\page\PageMenuItemProvider::isVisible() */ public function isVisible() { + // guests are not supported + if (!WCF::getUser()->userID) return false; + try { \wcf\data\chat\room\ChatRoom::getCache()->seek(0); return true;