Skip to content

Commit

Permalink
updates to enable options
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Jarvis committed Aug 21, 2016
1 parent a37acea commit a14aebf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions library/CavTools/ControllerPublic/RegiTrack.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,22 @@ class CavTools_ControllerPublic_RegiTrack extends XenForo_ControllerPublic_Abstr

public function actionIndex()
{

// Get enable value
$enable = XenForo_Application::get('options')->enableRegiTrack;

// If not enabled, escape
if(!$enable)
{
throw $this->getNoPermissionResponseException();
}

// If cannot view, escape
if (!XenForo_Visitor::getInstance()->hasPermission('CavToolsGroupId', 'viewRegiTrack'))
{
throw $this->getNoPermissionResponseException();
}

$regiPosGrps = XenForo_Application::get('options')->regiPosGrps;
$regiPosGrps = explode(',',$regiPosGrps);
$bat1PosGrps = XenForo_Application::get('options')->bat1PosGrps;
Expand Down

0 comments on commit a14aebf

Please sign in to comment.