X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Flostpass.php;h=166da25fc24b56b494ac60eea109dcf40e8725a0;hb=ac19a9cddc9e9cee323bb46123d95cfc02ffef0e;hp=f4e8e1de7d6bf90d5f0095964e2649b13bc5b445;hpb=ecea7425f8ad11ace4af39d476919e3203bff44f;p=friendica.git diff --git a/mod/lostpass.php b/mod/lostpass.php index f4e8e1de7d..166da25fc2 100644 --- a/mod/lostpass.php +++ b/mod/lostpass.php @@ -23,7 +23,7 @@ function lostpass_post(App $a) } $condition = ['(`email` = ? OR `nickname` = ?) AND `verified` = 1 AND `blocked` = 0', $loginame, $loginame]; - $user = DBA::selectFirst('user', ['uid', 'username', 'email'], $condition); + $user = DBA::selectFirst('user', ['uid', 'username', 'email', 'language'], $condition); if (!DBA::isResult($user)) { notice(L10n::t('No valid account found.') . EOL); goaway(System::baseUrl()); @@ -69,6 +69,8 @@ function lostpass_post(App $a) notification([ 'type' => SYSTEM_EMAIL, + 'language' => $user['language'], + 'to_name' => $user['username'], 'to_email' => $user['email'], 'uid' => $user['uid'], 'subject' => L10n::t('Password reset requested at %s', $sitename), @@ -85,7 +87,7 @@ function lostpass_content(App $a) if ($a->argc > 1) { $pwdreset_token = $a->argv[1]; - $user = DBA::selectFirst('user', ['uid', 'username', 'email', 'pwdreset_time'], ['pwdreset' => $pwdreset_token]); + $user = DBA::selectFirst('user', ['uid', 'username', 'email', 'pwdreset_time', 'language'], ['pwdreset' => $pwdreset_token]); if (!DBA::isResult($user)) { notice(L10n::t("Request could not be verified. \x28You may have previously submitted it.\x29 Password reset failed.")); @@ -165,6 +167,8 @@ function lostpass_generate_password($user) notification([ 'type' => SYSTEM_EMAIL, + 'language' => $user['language'], + 'to_name' => $user['username'], 'to_email' => $user['email'], 'uid' => $user['uid'], 'subject' => L10n::t('Your password has been changed at %s', $sitename),