Commit 051bcf92 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Ensure usertoname gets initialised in email_user (bug #515497)


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent fc489d10
......@@ -433,6 +433,7 @@ $string['noinstitutionsetpassemailmessagehtml'] = '<p>Dear %s,</p>
<p><a href="%sforgotpass.php?key=%s">%sforgotpass.php?key=%s</a></p>';
$string['debugemail'] = 'NOTICE: This e-mail was intended for %s <%s> but has been sent to you as per the "sendallemailto" configuration setting.';
$string['divertingemailto'] = 'Diverting email to %s';
// Expiry times
......
......@@ -389,6 +389,7 @@ function email_user($userto, $userfrom, $subject, $messagetext, $messagehtml='',
if ($messagehtml) {
$messagehtml = '<p>' . hsc($notice) . '</p>' . $messagehtml;
}
$usertoname = display_name($userto, $userto, true) . ' (' . get_string('divertingemailto', 'mahara', $to) . ')';
}
else {
$usertoname = display_name($userto, $userto);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment