[Zope] acl_users.manage_users and RESPONSE.redirect
Tim Cook
twcook@iswt.com
Wed, 20 Sep 2000 17:14:31 -0500
Tim Cook wrote:
>
> Chris Jenson wrote:
> >
> > I am using the following code (adding to acl_users folder with manage_users)
> > to do user self registration after some initial authentication using Zope
> > authentication and a common login/passwd. It works fine if things are as
> > they should be, but when things go south, password and confirm not equal,
> > login already exists, etc., it isn't so great. I would like to get ahold of
> > the output of manage_users to display on a redirected RESPONSE back to the
> > original vendorRegistration DTML Document. How can I do this?
>
> Might I suggest not letting yourself get into those situations?
>
> Check the acl_users folder for a matching id (login) and test the
> password for matches before you try to commit them. You'll throw
> an exception and the user will be required to press the back
> button and fix it.
>
> *** UNTESTED ***
> <dtml-in acl_users>
> <dtml-if login==sequence-item>
> <dtml-raise ID_Error>Login Already In Use.</dtml-raise>
> </dtml-if>
> </dtml-in>
>
> <dtml-unless "pat_password==pat_password2">
> <dtml-raise PasswordError>Passwords Do Not Match.</dtml-raise>
OOOPS! Can you tell I copied that right out of some other code?
<s>
To match your code it should be:
<dtml-unless "password==confirm">
<dtml-raise PasswordError>Passwords Do Not Match.</dtml-raise>
...
-- Tim Cook --
Cook Information Systems | Office: (901) 884-4126 8am-5pm CDT
* Specializing in Open Source Business Systems *
FreePM Project Coordinator http://www.freepm.org
OSHCA Founding Supporter http://www.oshca.org