FEU 3.1.4 forgets nocaptcha and logintemplate parameters.

General project discussion. NOT for help questions.
Post Reply
rvwilliams
Forum Members
Forum Members
Posts: 61
Joined: Wed Oct 05, 2011 9:59 am

FEU 3.1.4 forgets nocaptcha and logintemplate parameters.

Post by rvwilliams »

I've been trying to upgrade from an earlier version of FEU where I had a simple login with no Captcha that redirected a logged in user to a members only page.

In 3.1.4 I've made a small change to the default login template to do a page redirect when $return_msg is not empty as suggested by the module Help. My page content is

Code: Select all

    {cms_module_help module='FrontEndUsers' logintemplate='My Login form'}
    {FrontEndUsers nocaptcha=true}
The correct parameters are passed for the template creation stage. When the Submit button is clicked the parameters then don't include nocaptcha or the logintemplate. I've proved that by inserting a print_r($params); at the start of action.login.php As a result the form is represented with a captcha box and the user has to log in again. When the submit button is pressed the $final_msg is displayed even though there is no means for this to happen in my template but is in orig_logintemplate.tpl.

I don't know sufficient about module writing so I haven't been able to correct this myself.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: FEU 3.1.4 forgets nocaptcha and logintemplate parameters

Post by calguy1000 »

For security purposes the login form does not by default pass the parameters supplied to the module into the submitted post request.

The best solution is to use {cms_module_hint} for parameters that should persist after submission.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
rvwilliams
Forum Members
Forum Members
Posts: 61
Joined: Wed Oct 05, 2011 9:59 am

Re: FEU 3.1.4 forgets nocaptcha and logintemplate parameters

Post by rvwilliams »

Sorry, the suggestion to use cms_module_hint didn't work for me.

Here is my page content:

Code: Select all

{cms_module_hint module='FrontEndUsers' logintemplate='New FEU Login Form'}
{cms_module_hint module='FrontEndUsers' nocaptcha=true}
{cms_module_hint module='FrontEndUsers' action='login'}
{FrontEndUsers}
The included screenshots show the contents of $params on entering action.login.php. Before submit the correct values of nocaptcha and logintemplate are passed. After submit these values have disappeared.
screenshot before submit
screenshot before submit
I've overwritten the usernames and passwords to protect the innocent.
screenshot after submit
screenshot after submit
rvwilliams
Forum Members
Forum Members
Posts: 61
Joined: Wed Oct 05, 2011 9:59 am

Re: FEU 3.1.4 forgets nocaptcha and logintemplate parameters

Post by rvwilliams »

I've finally managed to make this work by putting the module hints in the Logic tab for the page rather than the Main content tab. I had to do the same for the logout where I wanted to use a post_logouttemplate.
Post Reply

Return to “General Discussion”