]> git.mxchange.org Git - friendica.git/blobdiff - mod/lostpass.php
New function to resize an image to not exceed a given file size
[friendica.git] / mod / lostpass.php
index 150c170d7a47b53bae77ca428e7a523bde016db6..6505db549723fc540fb89b0257b8400c71eb576e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -34,7 +34,7 @@ function lostpass_post(App $a)
                DI::baseUrl()->redirect();
        }
 
-       $condition = ['(`email` = ? OR `nickname` = ?) AND `verified` = 1 AND `blocked` = 0', $loginame, $loginame];
+       $condition = ['(`email` = ? OR `nickname` = ?) AND `verified` = 1 AND `blocked` = 0 AND `account_removed` = 0 AND `account_expired` = 0', $loginame, $loginame];
        $user = DBA::selectFirst('user', ['uid', 'username', 'nickname', 'email', 'language'], $condition);
        if (!DBA::isResult($user)) {
                DI::sysmsg()->addNotice(DI::l10n()->t('No valid account found.'));
@@ -49,7 +49,7 @@ function lostpass_post(App $a)
        ];
        $result = DBA::update('user', $fields, ['uid' => $user['uid']]);
        if ($result) {
-               info(DI::l10n()->t('Password reset request issued. Check your email.'));
+               DI::sysmsg()->addInfo(DI::l10n()->t('Password reset request issued. Check your email.'));
        }
 
        $sitename = DI::config()->get('config', 'sitename');
@@ -152,7 +152,7 @@ function lostpass_generate_password($user)
                        '$newpass' => $new_password,
                ]);
 
-               info(DI::l10n()->t("Your password has been reset."));
+               DI::sysmsg()->addInfo(DI::l10n()->t("Your password has been reset."));
 
                $sitename = DI::config()->get('config', 'sitename');
                $preamble = Strings::deindent(DI::l10n()->t('