[Zope] create user from script

Dennis Allison allison at sumeru.stanford.EDU
Thu Jan 13 16:05:24 EST 2005


Yes.  But what you want is much simpler.  To implement it, create a form
to capture the new user's name, then, as the action for that form, use the 
API (see the Appendices of The Zope Book and/or the code) to add a new
user.  The critical thing will be something like

	acl = container.restrictedTraverse( <<url of acl_users>> )
	acl.AddUser( name, password, roles, domains )

Not all user folders support adding users dynamically, but if you are
using the default, it does.  See the code for UserFolder to learn what the
defauts are for roles and domains.  

On Thu, 13 Jan 2005 mgagnon1 at gmu.edu wrote:

> Is it possible to create / edit objects from within a python script?  What I really want to do is have a form which will allow users to create new users.  Thanks!
> 
> -- Mike G
> 
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
> 



More information about the Zope mailing list