Login forms and selective dtml display
Dear All, I'm looking for a little help on constructing a simple login/hidden section application. What I want to do is thus: 1. User visits my site anonymously and sees a list of links, like A, B, C. 2. Because they are anonymous they don't see the D link (I've put some dtml code around the D link so it will only display if they are authenticated). 3. On the left hand border, there is a username, password and login button. The user enters his username and password and presses the login button. The system checks the login and logs the user in with the standard Zope login process (whatever that is). 4. If the person is now authenticated, then the page re-displays and they see A, B, C, D. I know that I will need to create an input form for the username and password and the Login button will do the submit but once the server side received the information how does one call "zope" to log the person in? I'm assuming it's some python script that will do the job? Can someone point me to a code snip? Thanks, Paul
Paul Merrill writes:
.... 3. On the left hand border, there is a username, password and login button. The user enters his username and password and presses the login button. The system checks the login and logs the user in with the standard Zope login process (whatever that is). The standard Zope user folder will not work with a login form.
You either need a cookie based user folder or CookieCrumbler. Then, it will be quite easy: you chose your forms form control names as required by your UserFolder, the CookieCrumber and reload the page, when the login form is submitted. Dieter
participants (2)
-
Dieter Maurer -
Paul Merrill