summaryrefslogtreecommitdiff
path: root/src/application/actions/lookupuser/get.php
diff options
context:
space:
mode:
authorJonas Kohl2024-10-11 14:44:38 +0200
committerJonas Kohl2024-10-11 14:44:38 +0200
commit023788b93d8c2eb6f5128c09f74aeccb9144b74e (patch)
tree8e94d4df34ebcef79cfc958ab30cdfd8f0b0a10b /src/application/actions/lookupuser/get.php
parent307b61ad625956e478c16f406061c9751baa928a (diff)
Change from exceptions to error pages
Diffstat (limited to 'src/application/actions/lookupuser/get.php')
-rw-r--r--src/application/actions/lookupuser/get.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/application/actions/lookupuser/get.php b/src/application/actions/lookupuser/get.php
index 74143f4..a7ed215 100644
--- a/src/application/actions/lookupuser/get.php
+++ b/src/application/actions/lookupuser/get.php
@@ -2,7 +2,11 @@
use mystic\forum\orm\User;
-$userHandle = $_GET["handle"] ?? throw new Exception(__("Missing handle"));
+$userHandle = $_GET["handle"] ?? call_user_func(function() {
+ http_response_code(400);
+ msg_error(__("Missing handle"));
+ exit;
+});
$user = new User();
$user->name = $userHandle;