This functionality is not directly supported by the Auth object, but we will look into supporting it in the future.
The FoxWeb Forum uses a hack to achieve this result, but there is no guarantee that this code will work with future versions. The following HTML is returned to the browser by the script that stores the user's registration information:
<form action="myscript.fwx" method="POST"> <input type="hidden" name="secSessionID" value="<%=Session.GetVar("secSessionID")%>"> <input type="hidden" name="secUserID" value="<%=M.Userid%>"> <input type="hidden" name="secPassword" value="<%=M.Pwd1%>"> <script language="JavaScript"> document.forms[0].submit(); </script> <p>Welcome <%=M.Fname%>!</p> <p><input type="submit" value="Access FoxWeb Forum"></p> </form> |
FoxWeb Support Team support@foxweb.com email |
Sent by Kia on 04/10/2005 06:24:12 PM:
Hi;
I'm working on a 'new user' screen where the username and password are verified and then user information screen is displayed.
Once this is done, I want to be able to log the user in automatically without directing him to the 'login' screen. This is the code that I tried but the Auth object won't accept it. Any idea on how I can log in a user via code?
FUNCTION LoginNewUser
=Auth.FormVars
secUserID = Session.GetVar("NewAccount_UserId")
secPassword = Session.GetVar("NewAccount_Password")
=Auth.FormAction
Thanks
Kia