Add feedback

This commit is contained in:
Philipp 2021-11-17 08:16:33 +01:00
parent d638775927
commit e73eda0156
No known key found for this signature in database
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() public function rawContent()
{ {
$addr = trim($_GET['addr'] ?? ''); $addr = trim($_GET['addr'] ?? '');
if (!$addr) {
if ($addr) { throw new NotFoundException('Parameter "addr" is missing or empty');
$url = Contact::getByURL($addr)['url'] ?? '';
if ($url) {
System::externalRedirect($url['url']);
exit();
}
} }
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']);
} }
} }