From 3ce68e4f8f3d04f01c49758d0dfcac33a02f775a Mon Sep 17 00:00:00 2001 From: gabrielrosset Date: Tue, 22 Mar 2016 10:19:16 +0100 Subject: [PATCH] MDL-53401 auth_mnet: add user created event trigger on MNET Moodle does not fire user_created event while creating user via MNET. That makes impossible to hook on user creation when user land into a host via MNET for the 1st time. --- auth/mnet/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/mnet/auth.php b/auth/mnet/auth.php index 8bd7768b5c7..ec5b3004f80 100644 --- a/auth/mnet/auth.php +++ b/auth/mnet/auth.php @@ -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; }