Forum OpenACS Q&A: àdd a batch of users

Posted by Ben Koot on
Hi folks,

Maybe a stupid question, but still.  A client of mine just send me a file of e-mailaddresses, I need to add to her OACS 4.6 site. The user section allows for batch upload, but... I only have an AOL 8.0 CSV list displaying just the e-mailaddress, so no names, no nothing else. Question... is just an email list suficient for starters?


sample,,,,,,,,,,,,, BVANDERPOOL,, Brenhague,,, bvpfreedom, mailto:BW3@BCBSM.COM

2: Re: add a batch of users (response to 1)
Posted by Patrick Giagnocavo on
I have done this sort of thing on a 3.2.5 OpenACS, and I assume that something similar will work on 4.x OACS as well.

In my case you write a small tclsh script which generates the exact INSERT statements you need. You can get the format of the statements from the user registration .tcl pages.  In your case you just need to generate a file with the right info.

Use the split command to split the email addresses between the left hand side and the right hand side.  LHS is the "first name" RHS is the "last name" (and drop the @ sign of course).

In the example above, ""; would become "agapetvl" for the first name and "" for the last name.  The users can log in and change this later if they so choose.