Registered Users Only

KMonsefi 04 Jul, 2009
Hi,

How do I set Chronoforms to display for registered users only? I've tried setting the menu option to Registered only, but it seems this can be bypassed by entering a different URL, i.e. index.php?option=com_chronocontact&chronoformname=RSVP instead of the menu URL index.php?option=com_chronocontact&Itemid=141 will allow bypass of registration requirement.

Thanks.
nml375 04 Jul, 2009
Hi,
You could try using something like this in your Form code:

<?php
$user =& JFactory::getUser();
if (!$user->guest):
?>Form content here...

<?
else:
?>
This form is only available to registered members! Please logon before attempting to access this form.
<?
endif;
 ?>


/Fredrik
GreyHead 05 Jul, 2009
Hi KMonsefi,

The Watchman Plugin also includes the ability to set the user groups who can see the form.

Bob
KMonsefi 06 Jul, 2009
Hi,

I haven't tried watchman yet, but Fredrick's reply worked perfectly. Also for anyone else that might be interested, I used the following code in the else:...endif; section instead to redirect to my community builder login if they are not logged in:

else:
$application = JFactory::getApplication();
$application->redirect(JRoute::_("index.php?option=com_comprofiler&task=login"), "You must login first." );
endif;
This topic is locked and no more replies can be posted.