diff options
| author | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
|---|---|---|
| committer | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
| commit | 4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch) | |
| tree | 5c07151ae61276d334e88f6309c30d439a85c12e /app/controllers/contact.php | |
| parent | da0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff) | |
| parent | 97a188592c679890a25c37ab78463add76a52ff7 (diff) | |
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'app/controllers/contact.php')
| -rw-r--r-- | app/controllers/contact.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/app/controllers/contact.php b/app/controllers/contact.php index 7dd2b05..2148777 100644 --- a/app/controllers/contact.php +++ b/app/controllers/contact.php @@ -189,9 +189,21 @@ class ContactController extends AuthenticatedController $user = User::findManyByUsername(Request::getArray('user')); } if ($group) { - $user = User::findMany(Statusgruppen::find($group)->members->pluck('user_id')); + $group_object = Statusgruppen::find($group); + if (!$group_object) { + $this->set_status(404); + $this->render_nothing(); + return; + } + $user = User::findMany($group_object->members->pluck('user_id')); } if (!$user) { + $user_object = User::findCurrent(); + if (!$user_object) { + $this->set_status(404); + $this->render_nothing(); + return; + } $user = User::findCurrent()->contacts; } |
