Forum .LRN Q&A: Bulk User Account problem

Collapse
Posted by Matthew Coupe on
Thanks for getting back Malte.
I have tried it with the following CSV files:

username,password,first_names,last_name,email,id,type,access_level,guest,notify
joestue,4jfe3,Joe,Student,mailto:joe@_somewhere_.net,1234567890,student,full,f,f

email,first_names,last_name,username
mailto:bob@_blabla_.com,matty,bob,foobar

username,password,first_names,last_name,email,id,type,access_level,guest,notify
joestue,4jfe3,Joe,Student,mailto:joe@_somewhere_.net,123-456-7890,student,full,f,f
al1stein,emc2,Albert,Einstein,mailto:al@_school_.edu,al,professor,full,f,t
syshack,,Systems,Hacker,mailto:syshacker@_company_.com,,admin,,,,
tester,test,Intersted,Onlooker,mailto:onlooker@_somewhere_.net,,external,limited,t,t

I have searched through them with a toothpick and couldn't find anything wrong with any of them. I may be really stupid and have missed something REALLY obvious out of this file...

I'll try the ns_log now and see what I can get. I hope I can get this fixed because we've got 20,000 accounts to create in the next month!

Matthew

Collapse
Posted by Malte Sussdorff on
I assume that you do not have spaces in your e-mail address CSV, otherwise this would be the first thing to do "regsub -all { } $email {} email".

Furthermore make absolutely sure that there is no blank line or anything like this in your CSV file at the end.

And last but not least, think about getting rid of the db_transaction and just log (instead of stop) on error, so you know which users failed to get inserted.