Merge branch 'MDL-64959_master' of https://github.com/abhimanyuZ/moodle
authorAdrian Greeve <abgreeve@gmail.com>
Wed, 1 May 2019 06:30:00 +0000 (14:30 +0800)
committerAdrian Greeve <abgreeve@gmail.com>
Wed, 1 May 2019 06:30:00 +0000 (14:30 +0800)
admin/tool/uploaduser/locallib.php

index ae3dfe3..f6eecce 100644 (file)
@@ -183,6 +183,7 @@ function uu_validate_user_upload_columns(csv_import_reader $cir, $stdfields, $pr
     $processed = array();
     foreach ($columns as $key=>$unused) {
         $field = $columns[$key];
+        $field = trim($field);
         $lcfield = core_text::strtolower($field);
         if (in_array($field, $stdfields) or in_array($lcfield, $stdfields)) {
             // standard fields are only lowercase