Joel BJOERK MSc. wrote:
> Hello,
>
> I have a hundred odd users or so that I would like to dump in out of
> Zope for inserting them in to a MySQL database. Does there exist a way
> of dumping atleast the username password and emailaddress to a text
> file? The xml file resulting from just exporting acl_users is not very
> user-friendly and doesn't seem to contain the email addresses.
This might give you some inspiration:
out = file('account_data.txt','w')
site = app[<your-site-id>]
mtool = site.portal_membership
for member in mtool.listMembers():
id = member.getId()
name = member.getProperty('fullname','')
email = member.getProperty('email','')
out.write("%s,%s,%s\n" % (id,name,email))
out.close()
Put this in a file (e.g., dumpMemberData.py) and call it
from INSTANCEHOME/bin like so:
zopectl run dumpMemberData.py
Note that you have to shut down your Zope before
unless you have a ZEO setting.
HTH,
Raphael
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click_______________________________________________
Plone-Users mailing list
Plone-Users@...
https://lists.sourceforge.net/lists/listinfo/plone-users