From 7258fdebc674d8d0f030da19dbb0404111dbc866 Mon Sep 17 00:00:00 2001 From: Nicolas JOURDAIN Date: Tue, 14 Aug 2018 15:19:47 +1000 Subject: [PATCH] Change actor in User Enrolment Created --- src/transformer/events/core/user_enrolment_created.php | 2 +- .../user_enrolment_created/existing_user_enrolled/event.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/transformer/events/core/user_enrolment_created.php b/src/transformer/events/core/user_enrolment_created.php index 1ccee4ace..5bed80134 100644 --- a/src/transformer/events/core/user_enrolment_created.php +++ b/src/transformer/events/core/user_enrolment_created.php @@ -22,7 +22,7 @@ function user_enrolment_created(array $config, \stdClass $event) { $repo = $config['repo']; - $user = $repo->read_record_by_id('user', $event->userid); + $user = $repo->read_record_by_id('user', $event->relateduserid); $course = $repo->read_record_by_id('course', $event->courseid); $lang = utils\get_course_lang($course); diff --git a/tests/core/user_enrolment_created/existing_user_enrolled/event.json b/tests/core/user_enrolment_created/existing_user_enrolled/event.json index 5488be97e..5f0c1129b 100644 --- a/tests/core/user_enrolment_created/existing_user_enrolled/event.json +++ b/tests/core/user_enrolment_created/existing_user_enrolled/event.json @@ -1,6 +1,6 @@ { "id": 1, - "userid": 1, + "relateduserid": 1, "courseid": 1, "timecreated": 1433946701, "objecttable": "user",