Re: [Zope-dev] Add a user to zope

2001-06-20 Thread Dyon Balding

Hi Johan,

It would probably be more efficient for you to look at alternative
user folders that retrieve user data directly from your SQL table.

I'm not sure the current state of the art product is for that, but
UserDb used to be the one, and we have that integrated successfully
in our site.

Check the Products area on zope.org, and I'm sure you'll find something.

-d

Johan Beauce wrote:
 
 Hello,
 
 I need your help. I'm trying to add all users from of our company in zope.
 I don't want enter all users and all passwords.
 I would like make a dtml-method which select all users and passwords
 in my (SQL) table and create automatically these users.
 I have created this dtml-method but I don't succed to redirect the page
 to acl_users/manage_users (method that create users)
 so that I don't need to press add button for each users.
 
 Do you Have a answer or another best solution ?
 
 Thanks ...
 
 Johan.
 
 form action=acl_users/manage_users method=post
 table
 
   input type=text name=name value=totoTest
   input type=password name=password value=test
   input type=password name=confirm value=test
   input type=text name=domains:tokens value=
   select name=roles:list size=5 multiple
 option value=ManagerManager
 option value=MemberMember
 option selected value=OwnerOwner
 option value=ReviewerReviewer
 option value=publisherpublisher
   /select
   input type=submit name=submit value=Add
 
 /table
 /form
 
 ... or ...
 
 dtml-call
 self.Users.acl_users._addUser('testToto','toto','toto','Owner',0)
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists -
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )

-- 
| Dyon Balding . Software Engineer . HiringTools.Monster.com
|   [EMAIL PROTECTED] . +1 415 288 3375

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



Re: [Zope-dev] Add a user to zope

2001-06-20 Thread Dieter Maurer

Johan Beauce writes:
  I need your help. I'm trying to add all users from of our company in zope.
  I don't want enter all users and all passwords.
  I would like make a dtml-method which select all users and passwords
  in my (SQL) table and create automatically these users.
  I have created this dtml-method but I don't succed to redirect the page
  to acl_users/manage_users (method that create users)
  so that I don't need to press add button for each users.
  
  Do you Have a answer or another best solution ?
You may have a look at LoginManager or GUF or
DBUserFolder. All these products (-- zope.org)
will allow you to let the users in your SQL database
and use them from there.
Having them at two different places (Zope and SQL)
will surely lead to inconsistencies over time.

If you do not want to go this route, search the mailing
list archives for manage_users.
You will find tons of messages how to add (or more general
manage) users programmatically. Yes, this is an FAQ.



Dieter

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



RE: [Zope-dev] Add a user to zope

2001-06-20 Thread Marco Nova

this is the piece of external method I use to import a user into a CMF
portal.

[...snip...]
import Zope
def add_zope_user( username, passwpord, email, fullname ):
  applic = Zope.app()
  roles = ['Member']
  domains = ''
  properties =
{'username':username,'email':email,'fullname':fullname,'listed':1}
  
  pr = applic.board.portal_registration
  pr.addMember( username, password, roles, domains, properties)
  
  return
[...snip...]

regards,

- mn


 -Original Message-
 From: Dyon Balding [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, June 20, 2001 7:18 PM
 To: Johan Beauce
 Cc: '[EMAIL PROTECTED]'
 Subject: Re: [Zope-dev] Add a user to zope
 
 
 Hi Johan,
 
 It would probably be more efficient for you to look at alternative
 user folders that retrieve user data directly from your SQL table.
 
 I'm not sure the current state of the art product is for that, but
 UserDb used to be the one, and we have that integrated successfully
 in our site.
 
 Check the Products area on zope.org, and I'm sure you'll find 
 something.
 
 -d
 
 Johan Beauce wrote:
  
  Hello,
  
  I need your help. I'm trying to add all users from of our 
 company in zope.
  I don't want enter all users and all passwords.
  I would like make a dtml-method which select all users and passwords
  in my (SQL) table and create automatically these users.
  I have created this dtml-method but I don't succed to 
 redirect the page
  to acl_users/manage_users (method that create users)
  so that I don't need to press add button for each users.
  
  Do you Have a answer or another best solution ?
  
  Thanks ...
  
  Johan.
  
  form action=acl_users/manage_users method=post
  table
  
input type=text name=name value=totoTest
input type=password name=password value=test
input type=password name=confirm value=test
input type=text name=domains:tokens value=
select name=roles:list size=5 multiple
  option value=ManagerManager
  option value=MemberMember
  option selected value=OwnerOwner
  option value=ReviewerReviewer
  option value=publisherpublisher
/select
input type=submit name=submit value=Add
  
  /table
  /form
  
  ... or ...
  
  dtml-call
  self.Users.acl_users._addUser('testToto','toto','toto','Owner',0)
  
  ___
  Zope-Dev maillist  -  [EMAIL PROTECTED]
  http://lists.zope.org/mailman/listinfo/zope-dev
  **  No cross posts or HTML encoding!  **
  (Related lists -
   http://lists.zope.org/mailman/listinfo/zope-announce
   http://lists.zope.org/mailman/listinfo/zope )
 
 -- 
 | Dyon Balding . Software Engineer . HiringTools.Monster.com
 |   [EMAIL PROTECTED] . +1 415 288 3375
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )