Split goaway to System::externalRedirectTo() and App->internalRedirect()

This commit is contained in:
Philipp Holzer 2018-10-19 20:11:27 +02:00
parent 2ef81108b3
commit d00ddc01af
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
61 changed files with 286 additions and 266 deletions

View file

@ -19,14 +19,14 @@ function lostpass_post(App $a)
{
$loginame = notags(trim($_POST['login-name']));
if (!$loginame) {
$a->redirect();
$a->internalRedirect();
}
$condition = ['(`email` = ? OR `nickname` = ?) AND `verified` = 1 AND `blocked` = 0', $loginame, $loginame];
$user = DBA::selectFirst('user', ['uid', 'username', 'email', 'language'], $condition);
if (!DBA::isResult($user)) {
notice(L10n::t('No valid account found.') . EOL);
$a->redirect();
$a->internalRedirect();
}
$pwdreset_token = autoname(12) . mt_rand(1000, 9999);
@ -78,7 +78,7 @@ function lostpass_post(App $a)
'body' => $body
]);
$a->redirect();
$a->internalRedirect();
}
function lostpass_content(App $a)