Page 1 of 1

FEU 3.1.4 forgets nocaptcha and logintemplate parameters.

Posted: Thu Oct 10, 2019 4:12 pm
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.

Re: FEU 3.1.4 forgets nocaptcha and logintemplate parameters

Posted: Thu Oct 10, 2019 5:00 pm
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.

Re: FEU 3.1.4 forgets nocaptcha and logintemplate parameters

Posted: Fri Oct 11, 2019 9:22 am
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

Re: FEU 3.1.4 forgets nocaptcha and logintemplate parameters

Posted: Sat Oct 12, 2019 3:32 pm
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.