1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-22 21:40:08 +00:00

Hide PageMenuItem for guests

They cannot view the page anyway ;)
This commit is contained in:
Tim Düsterhus 2011-11-27 20:01:28 +01:00
parent 94467d9103
commit 96e835e738

View File

@ -17,6 +17,9 @@ class ChatPageMenuItemProvider extends DefaultPageMenuItemProvider {
* @see wcf\system\menu\page\PageMenuItemProvider::isVisible() * @see wcf\system\menu\page\PageMenuItemProvider::isVisible()
*/ */
public function isVisible() { public function isVisible() {
// guests are not supported
if (!WCF::getUser()->userID) return false;
try { try {
\wcf\data\chat\room\ChatRoom::getCache()->seek(0); \wcf\data\chat\room\ChatRoom::getCache()->seek(0);
return true; return true;