Forms accessible only to registered users

Path 22 Sep, 2008
Hi all,

I am trying to create a form that only registered users can access, if they aren't registered it should show them the login/register screen. I know with articles you just have to set them to be accessible only to registered users and it would do that automaticaly, I was wondering if there is a similar way to do that with ChronoForms?

Thanks for the help.
Max_admin 22 Sep, 2008
Hi Path, please search the forums here for registered or JFactory and you should find too many posts about how to do this!

let me know if you got any troubles!

Regards

Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
GreyHead 22 Sep, 2008
Hi Path,

Use something like this in your form html
<?php
// redirect user to home page if not registered
$user = & JFactory::getUser();
if ( $user->id == 0 ) {
    $mainframe->redirect("index.php");
}
?>


Bob
Path 23 Sep, 2008

Hi Path,

Use something like this in your form html

<?php
// redirect user to home page if not registered
$user = & JFactory::getUser();
if ( $user->id == 0 ) {
    $mainframe->redirect("index.php");
}
?>


Bob



Thanks Bob!

tried looking into the forums but could only find information on how to use the CB and Joomla registration options (guess I am not using the best key words). Everything looks relatively click-and-add in Joomla!, didn't think I would have to rely on in-built functions!
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger