mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 06:27:52 +00:00
fix: add more specific error message to no access method
This commit is contained in:
@@ -41,8 +41,8 @@ class MathParserSM extends MathParser
|
|||||||
abortWithError(401 . ' Unauthorized');
|
abortWithError(401 . ' Unauthorized');
|
||||||
}
|
}
|
||||||
if (!$login || Factory::getContainer()->get(SiteApplication::class)->getIdentity()->id) {
|
if (!$login || Factory::getContainer()->get(SiteApplication::class)->getIdentity()->id) {
|
||||||
Log::add('an error occurred', Log::ERROR, 'com_sportsmanager');
|
Log::add('Unauthorized user with id ' . Factory::getContainer()->get(SiteApplication::class)->getIdentity()->id, Log::WARNING, 'com_sportsmanager');
|
||||||
throw new RuntimeException('An error occurred.', 500);
|
throw new RuntimeException('´Not authorized!', 401);
|
||||||
}
|
}
|
||||||
$version = new Version();
|
$version = new Version();
|
||||||
$joomla = $version->getShortVersion();
|
$joomla = $version->getShortVersion();
|
||||||
|
|||||||
Reference in New Issue
Block a user