I am using the following code (adding to acl_users folder with the
manage_users page) 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.  Looks like everything is fine, but the user isn't actually added.
How can I capture the possible errors and return to the user?  

Help would be much appreciated.  I am new to Zope and still trying to get my
head around it.

DTML Document-vendorRegistration
<dtml-var standard_html_header>
<h2><dtml-var title></h2>
<p>Register for Vendor Manual distribution</p>
<form action="registerAction" method="post"
     Login(e-mail address): 
     <input type="text" name="login">

... capture other stuff, like password, confirm, etc.

<dtml-in expr="vendorManuals.objectValues()">
      <dtml-var title_or_id>
      <input type="checkbox" name="<dtml-var title_or_id>"
<input type="submit" value=" Register " >
<dtml-var standard_html_footer> 

DTML Method-registerAction
<dtml-var standard_html_header>
<h2><dtml-var title></h2>

<dtml-call "REQUEST.set('name', login)">
<dtml-call "REQUEST.set('password', password)">
<dtml-call "REQUEST.set('confirm', confirm)">
<dtml-call "REQUEST.set('roles', ['cwcVendor'])">
<dtml-call "REQUEST.set('submit', 'Add')">
<dtml-call "acl_users.manage_users(submit='Add', REQUEST=REQUEST )">

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to