X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=mod%2Flostpass.php;h=8d1cf7629db26155d824d997d0b6ee004bf65047;hb=cde17704ddbbe2b4926824aa2aa7aec7a9ac2dd6;hp=3dcf41be733ef6b735a484008a3cf2deb8e40444;hpb=9f7878057f356ba785de26877a660bb025cae31d;p=friendica.git
diff --git a/mod/lostpass.php b/mod/lostpass.php
index 3dcf41be73..8d1cf7629d 100644
--- a/mod/lostpass.php
+++ b/mod/lostpass.php
@@ -24,7 +24,7 @@ function lostpass_post(&$a) {
intval($uid)
);
if($r)
- notice("Password reset request issued. Check your email.");
+ notice( t('Password reset request issued. Check your email.') . EOL);
$email_tpl = load_view_file("view/lostpass_eml.tpl");
$email_tpl = replace_macros($email_tpl, array(
@@ -35,8 +35,12 @@ function lostpass_post(&$a) {
'$reset_link' => $a->get_baseurl() . '/lostpass?verify=' . $new_password
));
- $res = mail($email, sprintf(t('Password reset requested at %s'),$a->config['sitename']),
- $email_tpl, 'From: ' . t('Administrator') . '@' . $_SERVER[SERVER_NAME]);
+ $res = mail($email, sprintf( t('Password reset requested at %s'),$a->config['sitename']),
+ $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());
}
@@ -53,7 +57,7 @@ function lostpass_content(&$a) {
dbesc($hash)
);
if(! count($r)) {
- notice("Request could not be verified. (You may have previously submitted it.) Password reset failed." . EOL);
+ notice( t("Request could not be verified. \x28You may have previously submitted it.\x29 Password reset failed.") . EOL);
goaway($a->get_baseurl());
return;
}
@@ -71,8 +75,15 @@ function lostpass_content(&$a) {
if($r) {
$tpl = load_view_file('view/pwdreset.tpl');
$o .= replace_macros($tpl,array(
+ '$lbl1' => t('Password Reset'),
+ '$lbl2' => t('Your password has been reset as requested.'),
+ '$lbl3' => t('Your new password is'),
+ '$lbl4' => t('Save or copy your new password - and then'),
+ '$lbl5' => '' . t('click here to login') . '.',
+ '$lbl6' => t('Your password may be changed from the Settings page after successful login.'),
'$newpass' => $new_password,
'$baseurl' => $a->get_baseurl()
+
));
notice("Your password has been reset." . EOL);
@@ -87,7 +98,10 @@ 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;
}
@@ -96,7 +110,12 @@ function lostpass_content(&$a) {
else {
$tpl = load_view_file('view/lostpass.tpl');
- $o .= $tpl;
+ $o .= replace_macros($tpl,array(
+ '$title' => t('Forgot your Password?'),
+ '$desc' => t('Enter your email address and submit to have your password reset. Then check your email for further instructions.'),
+ '$name' => t('Nickname or Email: '),
+ '$submit' => t('Reset')
+ ));
return $o;
}