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.
This commit is contained in:
gabrielrosset 2016-03-22 10:19:16 +01:00 committed by Simey Lameze
parent fed66ad9e2
commit 3ce68e4f8f

View 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;
}