Merge branch 'wip-MDL-53557-fix' of https://github.com/marinaglancy/moodle
authorDavid Monllao <davidm@moodle.com>
Wed, 30 Mar 2016 01:33:46 +0000 (09:33 +0800)
committerDavid Monllao <davidm@moodle.com>
Wed, 30 Mar 2016 01:33:46 +0000 (09:33 +0800)
auth/mnet/auth.php
auth/mnet/upgrade.txt [new file with mode: 0644]

index 6490a7f..11ddba2 100644 (file)
@@ -302,7 +302,7 @@ class auth_plugin_mnet extends auth_plugin_base {
             $remoteuser->firstaccess = 0;
             $remoteuser->confirmed = 1;
 
-            $remoteuser->id = $DB->insert_record('user', $remoteuser);
+            $remoteuser->id = user_create_user($remoteuser, false);
             $firsttime = true;
             $localuser = $remoteuser;
         }
diff --git a/auth/mnet/upgrade.txt b/auth/mnet/upgrade.txt
new file mode 100644 (file)
index 0000000..0a3128e
--- /dev/null
@@ -0,0 +1,6 @@
+This files describes API changes in auth_mnet code.
+
+=== 3.1 ===
+
+* Users now are created through user_create_user function which, apart from inserting the user in the database and generating
+  a user_created event, is applying the site default preferences if they are not set.