]> git.mxchange.org Git - friendica.git/blobdiff - mod/lostpass.php
ET translation updated THX Rain Hawk
[friendica.git] / mod / lostpass.php
index 036a308df5cad1a2303730d3627b4457d11c3144..1ffe000be2c26d655e6ba5a12111a5f912802c86 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -29,7 +29,7 @@ use Friendica\Util\Strings;
 
 function lostpass_post(App $a)
 {
-       $loginame = Strings::escapeTags(trim($_POST['login-name']));
+       $loginame = trim($_POST['login-name']);
        if (!$loginame) {
                DI::baseUrl()->redirect();
        }
@@ -92,8 +92,8 @@ function lostpass_post(App $a)
 
 function lostpass_content(App $a)
 {
-       if ($a->argc > 1) {
-               $pwdreset_token = $a->argv[1];
+       if (DI::args()->getArgc() > 1) {
+               $pwdreset_token = DI::args()->getArgv()[1];
 
                $user = DBA::selectFirst('user', ['uid', 'username', 'nickname', 'email', 'pwdreset_time', 'language'], ['pwdreset' => hash('sha256', $pwdreset_token)]);
                if (!DBA::isResult($user)) {
@@ -152,7 +152,7 @@ function lostpass_generate_password($user)
                        '$newpass' => $new_password,
                ]);
 
-               info("Your password has been reset.");
+               info(DI::l10n()->t("Your password has been reset."));
 
                $sitename = DI::config()->get('config', 'sitename');
                $preamble = Strings::deindent(DI::l10n()->t('