Batch add Users to Plone
From the Show-and-Tell-Department
Today I needed to add a bunch of new members to an existing Plone instance and to my dismay and surprise there doesn't seem to be an out-of-the-box method to import users into Plone (nor any readily available third-party-products). So much for Batteries Included... ;-)
Interestingly, Rocky Burt's response to my inquiry on #plone was: "[...]should take only 30min to write a CSV parser that creates the objects using portal_membership, no?"Well, it did take me a bit longer than that... but not much ;-) So here it is: a little python script to create new Plone users from CSV. To use it you need to do the following:
- Create a textfile with your userdata. The format is:
password;userid;lastname;firstname;email
- Log into the ZMI of your site and create a 'File' instance at the root of your plone instance. Give it the id 'users.csv' and the file you just created:

- Download the script.
- Also at the site root, create a 'Script (Python') instance in the root folder of your plone instance with the id 'importPASfromCSV' and the script you just downloaded. Click the 'Add and Edit' button:

- In the following form click on the 'Test' tab:

This will execute the script and its output will be shown onscreen. - There is no step 6.
