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

Collapse
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?

Cheers
Ben

sample

mailto:1jpmalone@msn.com, mailto:agapetvl@swbell.net, mailto:aluvforever69@hotmail.com, mailto:mjalce@worldnet.att.net, mailto:alice317@prodigy.net, mailto:caassociates@ica.net, mailto:anitabda@yahoo.com, mailto:anita.francis@avon.com, mailto:asa.grad@opendoorministry.org, mailto:bcrousseau@yahoo.com, mailto:bow_legs@hotmail.com, mailto:bramover@ameritech.net, mailto:nulinebus@earthlink.net, BVANDERPOOL, mailto:brendarokerwilson@hotmail.com, Brenhague, mailto:brian.jackson@selectcomfort.com, mailto:sciencenerd007d@aol.com, bvpfreedom, mailto:BW3@BCBSM.COM

Collapse
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, "mailto:agapetvl@swbell.net"; would become "agapetvl" for the first name and "swbell.net" for the last name.  The users can log in and change this later if they so choose.