MDL-41851 mod_forum: Use noreply user when sending forum notifications

This commit is contained in:
Andrew Nicols 2015-01-22 09:42:09 +08:00
parent da0ef2e4cf
commit 7cd4a0f6d5

View File

@ -789,10 +789,7 @@ function forum_cron() {
// If forum_replytouser is not set then send mail using the noreplyaddress.
if (empty($CFG->forum_replytouser)) {
// Clone userfrom as it is referenced by $users.
$cloneduserfrom = clone($userfrom);
$cloneduserfrom->email = $CFG->noreplyaddress;
$eventdata->userfrom = $cloneduserfrom;
$eventdata->userfrom = core_user::get_noreply_user();
}
$smallmessagestrings = new stdClass();