diff --git a/src/structure/components/com_sportsmanager/tools.php b/src/structure/components/com_sportsmanager/tools.php index 6aa2c09..07ac5a9 100644 --- a/src/structure/components/com_sportsmanager/tools.php +++ b/src/structure/components/com_sportsmanager/tools.php @@ -41,8 +41,8 @@ class MathParserSM extends MathParser abortWithError(401 . ' Unauthorized'); } if (!$login || Factory::getContainer()->get(SiteApplication::class)->getIdentity()->id) { - Log::add('an error occurred', Log::ERROR, 'com_sportsmanager'); - throw new RuntimeException('An error occurred.', 500); + Log::add('Unauthorized user with id ' . Factory::getContainer()->get(SiteApplication::class)->getIdentity()->id, Log::WARNING, 'com_sportsmanager'); + throw new RuntimeException('´Not authorized!', 401); } $version = new Version(); $joomla = $version->getShortVersion();