[Zope] adding users

Mike Renfro renfro@tntech.edu
Thu, 31 Jan 2002 13:19:54 -0600


On Thu, Jan 31, 2002 at 10:20:25AM -0800, Joshua Lanza wrote:

> I believe that you can use something like 
> 
> <dtml-call expr="acl_users.manage_users(...)">
> 
> The params for the method can be found in the form fields in the Add
> User form. 

That's probably what I used, or else I copied someone else's code that
did similarly. Here's sample code from one of my sites:

adduser
=======

(excerpts)

<form action="do_adduser" method=post>
<input type=text name=userlogin>
<input type=password name=userpass>
<input type=password name=passconfirmation>

do_adduser
==========

  <dtml-call "REQUEST.set('name', userlogin)">
  <dtml-call "REQUEST.set('password', userpass)">
  <dtml-call "REQUEST.set('confirm', passconfirmation)">
  <dtml-call "REQUEST.set('roles', ['Member'])">
  <dtml-call "acl_users.manage_users('Add',REQUEST,RESPONSE)">

the form that called the dtml method containing this code had input
fields for 'userlogin', 'userpass', and 'passconfirmation'. You could
of course just change those fields to be 'name', 'password', and
'confirm' and cut out my first three lines. Line 4 sets a list of
roles that the new account should have. Line 5 actually creates the
user.

-- 
Mike Renfro  / R&D Engineer, Center for Manufacturing Research,
931 372-3601 / Tennessee Technological University -- renfro@tntech.edu