Fix mail content format.

1.10.x
jmontoyaa 9 years ago
parent 0791810fca
commit 26639296e8
  1. 10
      main/inc/lib/login.lib.php

@ -154,6 +154,7 @@ class Login
PERSON_NAME_EMAIL_ADDRESS
);
$email_admin = api_get_setting('emailAdministrator');
$email_body = nl2br($email_body);
$result = @api_mail_html(
'',
@ -196,13 +197,20 @@ class Login
$url = api_get_path(WEB_CODE_PATH).'auth/reset.php?token='.$uniqueId;
$mailTemplate = new Template(null, false, false, false, false, false);
$mailLayout = $mailTemplate->get_template('mail/reset_password.tpl');
$mailTemplate->assign('complete_user_name', $user->getCompleteName());
$mailTemplate->assign('link', $url);
$mailLayout = $mailTemplate->get_template('mail/reset_password.tpl');
$mailSubject = get_lang('ResetPasswordInstructions');
$mailBody = $mailTemplate->fetch($mailLayout);
$mailBody = nl2br($mailBody);
$mailBody = sprintf(
get_lang('ResetPasswordCommentWithUrl'),
$url
);
api_mail_html(
$user->getCompleteName(),

Loading…
Cancel
Save