Forum OpenACS Development: Re: returning to a url after execution of auth::require_login
<html> <head><title>Iuri form</title></head> <body> <h1>Enter some values</h1> <form action="/iuri.tcl" method="POST"> <input type="string" name="op" value="a"> <input type="string" name="period" value="b"> <input type="submit"> </form> </body> </html>
auth::require_login ns_return 200 text/plain [export_entire_form_as_url_vars]
Result (in browser):
thanks for this. I mentioned in another comment that we have the kernel parameter RegisterRestrictEntireServerToRegisteredUsersFilters set to 1. In our case, when I place your script in a directory under /packages, it loses the form parameters when logged out i.e. after logging back in, it redirects to iuri.tcl? (with no params).
I tried this too in a recent OpenACS version, with RegisterRestrictEntireServerToRegisteredUsersFilters set to 1, and I still get the problem.
Sorry for delay. Here's the piece of code (palliative) that I added to my script in order to make it work. (i.e. Passing arguments from one page to another, with login authentication in the middle)
ad_set_cookie -replace "t" -path "/" op $id
ad_set_cookie -replace "t" -path "/" period $period
Once that is executed in the previous page (before login auth), both variables are stored in the session. And later on, in the next page, and after login auth, I grab them and destroy the session
# Unset vars from sesssion
Indeed, I need to upgrade my instance to the latest code. I haven't done it yet, because I forked a few notifications (to recover password and register confirmation), thus I need to replace them into a new custom pkg (outside acs-authentication).