[Zope] adding user to exUserFolder, how

Tobias Lang tlang@alternativeworlds.de
Thu, 21 Feb 2002 20:58:56 +0100


It works :-)

Are there any documentations about those interface-calls,
or do i have to look into the code?

Now i wanted to delete a user and tried this python script:

------------------------
request=context.REQUEST

request.set('name',username)
container.acl_users.manage_users('Delete',request)

return username
------------------------

but this don't work and i don't know why?
Is it possible to get an return value on failure, like:

if container.acl_user.manage_users(...)==false ???

Tobi



your message

> 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