Forum OpenACS Development: Re: ad_return_url and login link in the header bar

Collapse
Posted by Josue Cardona on
Thanks Gustaf!

You are correct, only when you are not registered and I have the version of the theme that has the fix, but only the password has been considered.

In my case involves a custom form for the login and it includes more inputs and for security reasons we would like to not include any of the values entered in the address bar and I was thinking more in a broader fix that we will not have to worry about any of the custom inputs for each change we make.

I know we could create a custom theme and a custom proc to handle that logic, which we have to some degree, but I was thinking that it will be better to keep using the default procs from acs-tcl in case those were to change in the future.

JC

Collapse
Posted by Gustaf Neumann on
The primary purpose of "ad_return_url" is to return all form and query variables. For instance, if a user’s session times out while filling out a for - regardless of the application or package in use - you wouldn’t want to lose the user’s input. Instead, after revalidating the user credentials via the register page, the user should be seamlessly returned to the partially completed form.

There may be scenarios where returning all form variables is not desired, which raises the question whether "ad_return_url" is the best choice in those cases. To address such concerns, the updated version of "ad_return_url" in the HEAD branch supports now both positive and negative selections of query/form variables for inclusion in the return URL. The new parameters follow the terminology established by "export_vars".

For details, see the commit [1]

Hope, this helps
-g

[1] https://openacs.org/api-doc/proc-view?proc=ad_return_url&source_p=1

Collapse
Posted by Josue Cardona on
This solution, which goes even further than I thought, greatly helps.

Thank you Gustaf!

JC