[Zope] add a user to zope

Arno Gross zope@consotec.de
Wed, 20 Jun 2001 15:52:11 -0100


Hi Johan,
try this:

<dtml-in selectMembers>
 <dtml-call "REQUEST.set('name', NAME)">
 <dtml-call "REQUEST.set('password', PASSWORD)">
 <dtml-call "REQUEST.set('confirm', PASSWORD)">
 <dtml-call "REQUEST.set('domains', '')">
 <dtml-call "REQUEST.set('roles', ['Owner'])">
 <dtml-call "acl_users.manage_users('Add', REQUEST, RESPONSE)">
</dtml-in>

selectMembers is a ZSQLMethod delivering NAME and PASSWORD.
Best regards
  Arno

On Wed, 20 Jun 2001, Johan Beauce wrote:
> Hello,
> 
> I need your help. I'm trying to add all users from of our company in zope.
> I don't want enter all users and all passwords.
> I would like make a dtml-method which select all users and passwords
> in my (SQL) table and create automatically these users.
> I have created this dtml-method but I don't succed to redirect the page
> to "acl_users/manage_users" (method that create users)
> so that I don't need to press add button for each users.
> 
> Do you Have a answer or another best solution ?
> 
> Thanks ...
> 
> Johan.
> 
> <form action="acl_users/manage_users" method="post">
> <table>
> 
>   <input type="text" name="name" value="totoTest">
>   <input type="password" name="password" value="test">
>   <input type="password" name="confirm" value="test">
>   <input type="text" name="domains:tokens" value="">
>   <select name="roles:list" size="5" multiple>
>             <option value="Manager">Manager
>             <option value="Member">Member
>             <option selected value="Owner">Owner
>             <option value="Reviewer">Reviewer
>             <option value="publisher">publisher
>   </select>
>   <input type="submit" name="submit" value="Add">
> 
> </table>
> </form>
> 
> ... or ...
> 
> <dtml-call
> "self.Users.acl_users._addUser('testToto','toto','toto','Owner',0)">
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )