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:
moodler 2005-03-01 07:06:42 +00:00
parent ab00aa12a9
commit 0afedf684d

View File

@ -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);