• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Rsform Conditional page with redirect

Rsform Conditional page with redirect 5 years 11 months ago #39104

  • info6626
  • info6626's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
Hello,
We have a form to make user registrations, and we have a doubt that maybe you can solve.

When the user registers the first time, the user joomla is created automatically by the "rsform registration" plugin.
When the user registers a second time we want to force the user to log in.

We have a multi-page form.
The first page has a field (New_user) asking if the user is already registered or not.
If it is not registered, pressing "next" goes to page 2.
If he is already registered, but he is not logged in, we want to redirect him to the login page.
We are using this code in Script called on form process:
$user = JFactory::getUser();
if(($_ POST['form']['New_user']=='0')&&($user->id>0) {//is a new user and he's notlogged in
       $mainframe->redirect("./index.php?option=com_users&view=login");
}
The script is executed when the page changes if the page's field validation is activated?, or it is executed only when the form is submit on the last page of the form?
How can we do it?
Thanks in advance,
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!