From 4235cb06b096f843e361cdffc265351e18ab3649 Mon Sep 17 00:00:00 2001 From: Johannes Burk Date: Wed, 1 Jun 2016 20:01:23 +0200 Subject: [PATCH] Fixes --- lib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib.php b/lib.php index b8f377d..cb84b2d 100644 --- a/lib.php +++ b/lib.php @@ -280,7 +280,7 @@ class enrol_apply_plugin extends enrol_plugin { } function send_application_notification($instance, $userid, $data) { - global $PAGE; + global $CFG, $PAGE; $renderer = $PAGE->get_renderer('enrol_apply'); @@ -291,7 +291,7 @@ class enrol_apply_plugin extends enrol_plugin { // Include standard user profile fields? $standarduserfields = null; if ($instance->customint1) { - $standarduserfields = $data; + $standarduserfields = clone $data; unset($standarduserfields->applydescription); } @@ -299,7 +299,6 @@ class enrol_apply_plugin extends enrol_plugin { $extrauserfields = null; if ($instance->customint2) { require_once($CFG->dirroot.'/user/profile/lib.php'); - $user = $DB->get_record('user',array('id' => $user->id)); profile_load_custom_fields($user); $extrauserfields = $user->profile; }