Index: openacs-4/packages/dotlrn/www/admin/users-bulk-upload-2.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/users-bulk-upload-2.tcl,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/dotlrn/www/admin/users-bulk-upload-2.tcl 20 Apr 2004 21:13:22 -0000 1.13
+++ openacs-4/packages/dotlrn/www/admin/users-bulk-upload-2.tcl 26 May 2004 18:54:35 -0000 1.14
@@ -47,7 +47,6 @@
oacs_util::csv_foreach -file $file_location -array_name row {
# First make sure the required data is there
-
if { ![info exists row(email)] || ![info exists row(first_names)] || ![info exists row(last_name)] } {
doc_body_append "
Datafile must include at least the email, first_names and last_name fields
"
db_abort_transaction
@@ -56,17 +55,25 @@
# We need to insert the ACS user
set password [ad_generate_random_string]
-
+
# Check if this user already exists
set user_id [cc_lookup_email_user $row(email)]
if {![empty_string_p $user_id]} {
doc_body_append [_ dotlrn.user_email_already_exists [list user_email $row(email)]]
lappend list_of_user_ids $user_id
} else {
-
- array set auth_status_array [auth::create_user -email $row(email) -first_names $row(first_names) -last_name $row(last_name) -password $password]
+
+ set user_id [db_nextval acs_object_id_seq]
+
+ auth::create_user \
+ -user_id $user_id \
+ -username "" \
+ -email $row(email) \
+ -first_names $row(first_names) \
+ -last_name $row(last_name) \
+ -password $password
+
- set user_id $auth_status_array(user_id)
lappend list_of_user_ids $user_id
if {![info exists row(type)]} {