billybatz9
Active member
So I have this code for one of the xenforo addons:
How do I disable the plugin for visitors? I think this code says to enable the plugin for visitors, but I need it disabled for visitors. Any idea? Thanks
Code:
<?php
class Waindigo_ForumListTabs_ControllerPublic_Toggle extends XenForo_ControllerPublic_Abstract
{
public function actionIndex()
{
if (XenForo_Application::get('options')->waindigo_forumListTabs_enable) {
$visitor = XenForo_Visitor::getInstance();
$toggle = empty($visitor['use_forum_tabs']) ? 1 : 0;
$userModel = $this->getModelFromCache('XenForo_Model_User');
$userModel->update($visitor->toArray(), 'use_forum_tabs', $toggle);
}
return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS,
$this->getDynamicRedirect(false, true));
} /* END actionIndex */
}
How do I disable the plugin for visitors? I think this code says to enable the plugin for visitors, but I need it disabled for visitors. Any idea? Thanks