Bugfixing redirects

- Adding App->redirect if both redirects are possible
This commit is contained in:
Philipp Holzer 2018-10-24 20:16:14 +02:00
parent 9c9ebfc7c9
commit 48535c0959
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
4 changed files with 25 additions and 19 deletions

View file

@ -15,11 +15,7 @@ function randprof_init(App $a)
if ($x) {
$link = Contact::magicLink($x);
// @TODO making the return of magicLink save to use either externalRedirect or internalRedirect
if (filter_var($link, FILTER_VALIDATE_URL)) {
System::externalRedirect($link);
} else {
$a->internalRedirect($link);
}
$a->redirect($link);
}
$a->internalRedirect('profile');