X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Flostpass.php;h=530619bc4f7fa484c29be5a5a6166fb57a5d9789;hb=f9444c8be50f91282a81eebc84825813d118bfe4;hp=c46a57e6a2bfb7846ef3cac474bc11c888d036a5;hpb=e35a5bac55e0e259c7c587adfaf546484b032c92;p=friendica.git diff --git a/mod/lostpass.php b/mod/lostpass.php index c46a57e6a2..530619bc4f 100644 --- a/mod/lostpass.php +++ b/mod/lostpass.php @@ -26,7 +26,7 @@ function lostpass_post(&$a) { if($r) notice( t('Password reset request issued. Check your email.') . EOL); - $email_tpl = load_view_file("view/lostpass_eml.tpl"); + $email_tpl = get_intltext_template("lostpass_eml.tpl"); $email_tpl = replace_macros($email_tpl, array( '$sitename' => $a->config['sitename'], '$siteurl' => $a->get_baseurl(), @@ -36,7 +36,11 @@ function lostpass_post(&$a) { )); $res = mail($email, sprintf( t('Password reset requested at %s'),$a->config['sitename']), - $email_tpl, 'From: ' . t('Administrator') . '@' . $_SERVER[SERVER_NAME]); + $email_tpl, + 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" + . 'Content-type: text/plain; charset=UTF-8' . "\n" + . 'Content-transfer-encoding: 8bit' ); + goaway($a->get_baseurl()); } @@ -69,7 +73,7 @@ function lostpass_content(&$a) { intval($uid) ); if($r) { - $tpl = load_view_file('view/pwdreset.tpl'); + $tpl = get_markup_template('pwdreset.tpl'); $o .= replace_macros($tpl,array( '$lbl1' => t('Password Reset'), '$lbl2' => t('Your password has been reset as requested.'), @@ -85,7 +89,7 @@ function lostpass_content(&$a) { - $email_tpl = load_view_file("view/passchanged_eml.tpl"); + $email_tpl = get_intltext_template("passchanged_eml.tpl"); $email_tpl = replace_macros($email_tpl, array( '$sitename' => $a->config['sitename'], '$siteurl' => $a->get_baseurl(), @@ -94,14 +98,17 @@ function lostpass_content(&$a) { '$new_password' => $new_password, '$uid' => $newuid )); - $res = mail($email,"Your password has changed at {$a->config['sitename']}",$email_tpl,"From: Administrator@{$_SERVER[SERVER_NAME]}"); + $res = mail($email,"Your password has changed at {$a->config['sitename']}",$email_tpl, + 'From: ' . t('Administrator') . '@' . $_SERVER['SERVER_NAME'] . "\n" + . 'Content-type: text/plain; charset=UTF-8' . "\n" + . 'Content-transfer-encoding: 8bit' ); return $o; } } else { - $tpl = load_view_file('view/lostpass.tpl'); + $tpl = get_markup_template('lostpass.tpl'); $o .= replace_macros($tpl,array( '$title' => t('Forgot your Password?'),