[Zope-PTK] Simultaneous Register and Login?

Paul Erickson erickson@ifopen.com
Mon, 27 Mar 2000 16:26:11 -0700


Has anyone else tried to set up a PTK so that the user is automatically
logged in after they register?

From the register function, I set the __ac_name and __ac_password
variables (in REQUEST), then returned the "logged_in" method instead of
"registered".  This does not work, and MemberFolder.Validate() does not
get those 2 variables.  Instead, it gets the __ac_name from the cookie
in your browser, and the __ac_password field is not set.

I can set those 2 variables, then return the "login_form" DTML Method
and that form will prepopulate the username and password (i changed it
to do populate the password), and then if you press the login button
everything is fine.

Clearly I'm missing something in the inner workings of Zope.  Can
someone briefly explain to me what happens when you return a DTML
method, and how it interacts with the PTK's validation?

BTW, I'm just using the ZODBMemberFolder.

Thanks for any input.

-Paul