[Zope] SimpleUserFolder

David Hassalevris bluepaul at earthlink.net
Thu Feb 24 16:56:01 EST 2005


jamie at textmatters.com wrote:

>In the documentation for SimpleUserFolder, it says
>
>   def addUser(name, password, roles)
>
>    This adds a user. It should raise an exception
>    if the user already exists.
>
>
>What should it do if the user can't be added for any other reason? Any
>exception that I raise returns the error "user already exists" to the
>user, but the user doesn't already exist, I just don't want to allow him
>to be created. Surely I should be able to return different exceptions to
>give different reasons to the user as to why a new user cannot be created.
>
>Robert Munro
>_______________________________________________
>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 )
>
>  
>
Jamie,
Im a little confused by your question so forgive if Im off the mark.  
But shouldn't you determine whether or not you wish to add a user 
*before* you call addUser?
David



More information about the Zope mailing list