[Zope-CMF] Importing TSV to Members

alan runyan alan runyan" <runyaga@runyaga.com
Sat, 27 Apr 2002 17:30:26 -0500

use an external method.

maybe something like:

def getMemberProperties(tsv_line):
    #parses line and sets the below vars
    return userid, passwd, roles, memberProperites

def importMembersFromTSV(self):
    for line in tsv_file:
        membership=getToolByName(self, 'portal_membership')
        userid, passwd, roles, memberProperties=getMemberProperties(line)
        membership.addMember(userid, passwd, roles, domains,

if you get this sorted out please post a recipe on http://zopelabs.com/


----- Original Message -----
From: "Dameron Midgette" <dameronm@rolfingsi.com>
To: "zope-cmf" <zope-cmf@zope.org>
Sent: Friday, April 26, 2002 1:19 PM
Subject: [Zope-CMF] Importing TSV to Members

> Hi All!
>     I'm needing to create a bunch of new mwmbers in an empty CMF site,
> from a tab-separated text file (access export). I've got the new fields
> set up in portal_memberdata, and i'm working on changing the join and
> personalize fields for later additions, but I have one big batch to add
> from this file.
>     Parsing the file shouldn't be *too* hard (I'm a python newbie); if
> anyone wants to spell it out, that would be fine, though :) The thing I
> really need help with is the syntax for creating a new member, complete
> with member folder and lots of extra metadata, etc.. (Having emails sent
> with passwords to each member as they are imported would be a great
>     Any and all suggestions, snippets, and solutions welcome! TIA
> Cheers,
> Dameron
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature