public function __construct() { parent::__construct(); $user = JFactory::getUser(); if (!$user->get('id')) { JFactory::getApplication()->redirect('index.php', JText::_('COM_JM_NOT_AUTH_MSG')); exit; } $params = JComponentHelper::getParams('com_jm'); $this->set('can_register', $params->get('key_registration', false) && $user->get('gid') >= $params->get('key_registration_access', 18)); }