[Zope] Adding users via external database

Montagne, Michael montagne@BOORA.com
Wed, 29 Aug 2001 16:15:22 -0700


 This is my code for adding a ZClass to the ZUser folder product.  I'm
trying to walk through a recordset returned by CurrEmployees and add each
one to the database.  I can successfully add a user if I take all the
database references out and plug in values manually, but when the <dtml-in
CurrEmployees> tag is involved I get an attribute error.  I'm afraid I've
committed some sort of namespace goofup but I'm stuck.  I know user_add
works because I can plug in numbers, and I know I'm getting values because I
print it out at the bottom. 
What could it be.....?


  <dtml-with database>
  <dtml-in CurrEmployees>
  <dtml-call "REQUEST.set('changed','no')">
  <dtml-call "REQUEST.set('added','no')">
  <dtml-comment><dtml-call
"REQUEST.set('users_in_folder',acl_users.getUsers())"></dtml-comment>
  <dtml-call "REQUEST.set('name',Login)">
  <dtml-call "REQUEST.set('password',password)">
  <dtml-call "REQUEST.set('confirm',password)">
  <dtml-call "REQUEST.set('staffid',StaffId)">
  <dtml-call "REQUEST.set('roles',['Staff'])">
  <dtml-call "REQUEST.set('domains',[])">
  <dtml-call "REQUEST.set('email','none')">
  <dtml-call "REQUEST.set('submit','Add')">
  <dtml-call "REQUEST.set('id',Login)">

  <dtml-with "manage_addProduct['ZUserProduct']">
    <dtml-call "user_add(_.None, _, NoRedir=1)">  
  </dtml-with>

  <p><dtml-var Login> added</p>
  </dtml-in>
  </dtml-with>