mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Fixed the link for the confirmation email ... the & was breaking in some
mail ... see also bug 2502 for something similar
This commit is contained in:
parent
ab00aa12a9
commit
0afedf684d
@ -3151,13 +3151,19 @@ function reset_password_and_mail($user) {
|
||||
|
||||
$data->firstname = fullname($user);
|
||||
$data->sitename = $site->fullname;
|
||||
$data->link = $CFG->wwwroot .'/login/confirm.php?p='. $user->secret .'&s='. $user->username;
|
||||
$data->admin = fullname($from) .' ('. $from->email .')';
|
||||
|
||||
$message = get_string('emailconfirmation', '', $data);
|
||||
$subject = get_string('emailconfirmationsubject', '', $site->fullname);
|
||||
|
||||
$messagehtml = text_to_html($message, false, false, true);
|
||||
/// Make the text version a normal link for normal people
|
||||
$data->link = $CFG->wwwroot .'/login/confirm.php?p='. $user->secret .'&s='. $user->username;
|
||||
$message = get_string('emailconfirmation', '', $data);
|
||||
|
||||
/// Make the HTML version more XHTML happy (&)
|
||||
$data->link = $CFG->wwwroot .'/login/confirm.php?p='. $user->secret .'&s='. $user->username;
|
||||
$messagehtml = text_to_html(get_string('emailconfirmation', '', $data), false, false, true);
|
||||
|
||||
$user->mailformat = 1; // Always send HTML version as well
|
||||
|
||||
return email_to_user($user, $from, $subject, $message, $messagehtml);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user