From 4bc1a611da7776f22f2cfeee8e472038b7d8673c Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 19 Apr 2020 13:48:22 +0200 Subject: Reclassify various exceptions as InsufficientPermissionsException That way they get the correct HTTP status code and they also get ignored by the logging code. Signed-off-by: Florian Pritz --- application/service/user.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/service/user.php') diff --git a/application/service/user.php b/application/service/user.php index 336941ca4..1d678106a 100644 --- a/application/service/user.php +++ b/application/service/user.php @@ -93,7 +93,7 @@ class user { ->count_all_results(); if ($invitations + 1 > $CI->config->item('max_invitation_keys')) { - throw new \exceptions\PublicApiException("user/invitation-limit", "You can't create more invitation keys at this time."); + throw new \exceptions\InsufficientPermissionsException("user/invitation-limit", "You can't create more invitation keys at this time."); } $key = random_alphanum(12, 16); -- cgit v1.2.3-24-g4f1b