$rolecache[$rname]->id = $rid; $rolecache[$rname]->name = $rname; } } unset($allowedroles); // clear bulk selection if ($bulk) { $SESSION->bulk_users = array(); } // init csv import helper $cir->init(); $linenum = 1; //column header is first line // init upload progress tracker $upt = new uu_progress_tracker(); $upt->init(); // start table while ($line = $cir->next()) { $upt->flush(); $linenum++; $upt->track('line', $linenum); $user = new object(); // by default, use the local mnet id (this may be changed in the file) $user->mnethostid = $CFG->mnet_localhost_id; // add fields to user object foreach ($line as $key => $value) { if ($value !== '') { $key = $columns[$key]; // password is special field if ($key == 'password') { if ($value !== '') {
} else { $manual = NULL; } // clear bulk selection if ($bulk) { $SESSION->bulk_users = array(); } // init csv import helper $cir->init(); $linenum = 1; //column header is first line // init upload progress tracker $upt = new uu_progress_tracker(); $upt->init(); // start table while ($line = $cir->next()) { $upt->flush(); $linenum++; $upt->track('line', $linenum); $forcechangepassword = false; $user = new stdClass(); // by default, use the local mnet id (this may be changed in the file) $user->mnethostid = $CFG->mnet_localhost_id; // add fields to user object foreach ($line as $key => $value) { if ($value !== '') {