John Reitano
|
Posted: 04/17/2002, 9:26 AM |
|
I would like to automatically log the user in after he registers via my "MemberRegistration" page. After the user registers, I have the his Login and Password and would like to pass these to the Login page and have the Login form's action performed. I would like to do this in a secure way, e.g., using POST instead of GET.
Any ideas on how to accomplish this?
I'm working in JSP but I can read examples in ASP or perl.
|
|
|
Jon Westfall
|
Posted: 04/17/2002, 9:36 AM |
|
All you need to do is set the 2 global session variables UserID and UserRights. The gotocode ccs file has the following code:
set_session("UserID", dlookup("users", "user_id", "user_login =" . tosql($flduser_login, "Text")));
set_session("UserRights",1);
which shows how to do it in ASP. Simply find the syntax for JSP and implement after insert on your registration form.
Jon.
|
|
|
andrewr
|
Posted: 09/11/2003, 7:37 AM |
|
Can someone tell me the vbscript equivilant? I am not sure that the $fld variable refers to
|
|
|
David Dossot
|
Posted: 09/26/2003, 1:54 PM |
|
Hey John,
I agree that the session variable solution is the cleanest one. If you want to stick to your idea of POSTing, then you would have to do that:
- the JSP that receives the registration detail should POST to the login JSP (cf. how there: http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html),
- this JSP should then return to the browser the reply of the POST on the login JSP.
This should do the trick.
Take care,
David
|
|
|
|