[Zope] adding user to exUserFolder, how

Carlos de la Guardia cguardia@aldeasystems.com
Wed, 20 Feb 2002 16:40:27 -0600 (CST)


Hi,

this python script does the trick:

-----------------------------------------------------------------------------
# parameters: username, password, confirm_password, roles
# This method assumes an aquirable exUserFolder (acl_users) is available
# from its context

request=context.REQUEST

request.set('name',username)
request.set('password',password)
request.set('confirm',confirm_password)

# remember, roles is a list of roles
request.set('roles',roles)

container.acl_users.manage_users('Add',request)

# just to return something in this example
return request['name']
------------------------------------------------

Carlos de la Guardia
Aldea Systems


On Wed, 20 Feb 2002 20:42:34 +0100 Tobias Lang <tlang@alternativeworlds.de> wrote:

> Hi, 
> 
> how can i add with python-script or dtml-method dynamical (via Forms) 
> users to the exUserFolder. I tried the createUser-Method from the 
> API, but i didn't get the wished result (i am new to zope and python). 
> 
> Perhaps someone can me give some hints or an example. 
> 
> Thanks. 
> 
> Tobi
>