Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-29534 Forum: If forum_replytouser is not set then don't display f…

…rom user email"
  • Loading branch information...
commit 3c3ca35fee2b7565edbe19e1fd1692388d58aaf8 1 parent d63a406
@marcoblancas marcoblancas authored rajeshtaneja committed
Showing with 6 additions and 1 deletion.
  1. +6 −1 mod/forum/lib.php
View
7 mod/forum/lib.php
@@ -715,6 +715,11 @@ function forum_cron() {
$eventdata->contexturl = "{$CFG->wwwroot}/mod/forum/discuss.php?d={$discussion->id}#p{$post->id}";
$eventdata->contexturlname = $discussion->name;
+ // If forum_replytouser is not set then set mail display to 0.
+ if (!$CFG->forum_replytouser) {
+ $eventdata->userfrom->maildisplay = 0;
+ }
+
$mailresult = message_send($eventdata);
if (!$mailresult){
mtrace("Error: mod/forum/lib.php forum_cron(): Could not send out mail for id $post->id to user $userto->id".
@@ -1009,7 +1014,7 @@ function forum_cron() {
$usetrueaddress = true;
// Directly email forum digests rather than sending them via messaging, use the
// site shortname as 'from name', the noreply address will be used by email_to_user.
- $mailresult = email_to_user($userto, $site->shortname, $postsubject, $posttext, $posthtml, $attachment, $attachname, $usetrueaddress, $CFG->forum_replytouser);
+ $mailresult = email_to_user($userto, $site->shortname, $postsubject, $posttext, $posthtml, $attachment, $attachname, $usetrueaddress);
if (!$mailresult) {
mtrace("ERROR!");
Please sign in to comment.
Something went wrong with that request. Please try again.