Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

optionalDefaults are now set using settings from Admin account

  • Loading branch information...
commit 50592627702481f7acd4b966be7cf34b884e88bb 1 parent bf7ccea
fiedorow authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 admin/uploaduser.php
6 admin/uploaduser.php
View
@@ -36,6 +36,8 @@
$usernotaddederror = get_string("usernotaddederror");
$enroledincourse = get_string("enroledincourse");
$notenroledincourse = get_string("notenroledincourse");
+
+ $adminuser = get_record("user","id",1);
/// Print the header
@@ -109,6 +111,10 @@
}
$linenum = 2; // since header is line 1
+ foreach ($optionalDefaults as $key => $value) {
+ $user->$key = $adminuser->$key;
+ }
+
while (!feof ($fp)) {
//Note: commas within a field should be encoded as &#44
$line = split("\,", fgets($fp,1024));
Please sign in to comment.
Something went wrong with that request. Please try again.