[ZPT] Adding users in Plone 2.0 Programmatically?

Nguyen, Joe Joe.Nguyen at coair.com
Fri Apr 23 16:12:47 EDT 2004


How would I go about adding a user (members) programmatically in plone 2
with their name, password, roles, and domains as fields?

 

I used this script in plone 1.05.

 

 

name = context.REQUEST.get('name')

password = context.REQUEST.get('password')

 

userfolder = getattr(container, 'acl_users')

user_info = { 'name': name,

              'password': password,

              'confirm': password,

              'roles': ['Member'],

              'domains': []

            }

 

userfolder.manage_users(submit='Add', REQUEST=user_info)

 

Any help would be much appreciated!

 

Joe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zpt/attachments/20040423/5e02072d/attachment.html


More information about the ZPT mailing list