X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Flostpass.php;h=6505db549723fc540fb89b0257b8400c71eb576e;hb=ec54b303c5fd25ff95e6a819db2693acc6218b40;hp=1ffe000be2c26d655e6ba5a12111a5f912802c86;hpb=23b10cf2ae5fe10ba21a4b43e1aae17818647661;p=friendica.git diff --git a/mod/lostpass.php b/mod/lostpass.php index 1ffe000be2..6505db5497 100644 --- a/mod/lostpass.php +++ b/mod/lostpass.php @@ -1,6 +1,6 @@ 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)) { - notice(DI::l10n()->t('No valid account found.')); + DI::sysmsg()->addNotice(DI::l10n()->t('No valid account found.')); DI::baseUrl()->redirect(); } @@ -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'); @@ -97,7 +97,7 @@ function lostpass_content(App $a) $user = DBA::selectFirst('user', ['uid', 'username', 'nickname', 'email', 'pwdreset_time', 'language'], ['pwdreset' => hash('sha256', $pwdreset_token)]); if (!DBA::isResult($user)) { - notice(DI::l10n()->t("Request could not be verified. \x28You may have previously submitted it.\x29 Password reset failed.")); + DI::sysmsg()->addNotice(DI::l10n()->t("Request could not be verified. \x28You may have previously submitted it.\x29 Password reset failed.")); return lostpass_form(); } @@ -110,7 +110,7 @@ function lostpass_content(App $a) ]; DBA::update('user', $fields, ['uid' => $user['uid']]); - notice(DI::l10n()->t('Request has expired, please make a new one.')); + DI::sysmsg()->addNotice(DI::l10n()->t('Request has expired, please make a new one.')); return lostpass_form(); } @@ -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('