MDL-62445 tool_privacy: pass correct user to message_send
authorMarina Glancy <marina@moodle.com>
Tue, 15 May 2018 02:27:52 +0000 (10:27 +0800)
committerMarina Glancy <marina@moodle.com>
Tue, 15 May 2018 02:27:52 +0000 (10:27 +0800)
admin/tool/dataprivacy/classes/api.php

index 9054612..7831a5f 100644 (file)
@@ -418,7 +418,7 @@ class api {
         $message->courseid          = $SITE->id;
         $message->component         = 'tool_dataprivacy';
         $message->name              = 'contactdataprotectionofficer';
-        $message->userfrom          = $requestedby;
+        $message->userfrom          = $requestedby->id;
         $message->replyto           = $requestedby->email;
         $message->replytoname       = $requestedby->fullname;
         $message->subject           = $subject;