Skip to content

Commit

Permalink
MDL-53401 auth_mnet: add user created event trigger on MNET
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
gabrielrosset authored and lameze committed Mar 23, 2016
1 parent fed66ad commit 3ce68e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auth/mnet/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ function confirm_mnet_session($token, $remotepeer) {
$remoteuser->firstaccess = 0;
$remoteuser->confirmed = 1;

$remoteuser->id = $DB->insert_record('user', $remoteuser);
$remoteuser->id = user_create_user($remoteuser, false);
$firsttime = true;
$localuser = $remoteuser;
}
Expand Down

0 comments on commit 3ce68e4

Please sign in to comment.