Add feedback

This commit is contained in:
Philipp Holzer 2021-11-17 08:16:33 +01:00
parent d638775927
commit e73eda0156
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432
2 changed files with 8 additions and 8 deletions

View file

@ -34,15 +34,15 @@ class Acctlink extends BaseModule
public function rawContent()
{
$addr = trim($_GET['addr'] ?? '');
if ($addr) {
$url = Contact::getByURL($addr)['url'] ?? '';
if ($url) {
System::externalRedirect($url['url']);
exit();
}
if (!$addr) {
throw new NotFoundException('Parameter "addr" is missing or empty');
}
throw new NotFoundException('Parameter "url" is missing');
$contact = Contact::getByURL($addr, null, ['url']) ?? '';
if (!$contact) {
throw new NotFoundException('Contact not found');
}
System::externalRedirect($contact['url']);
}
}