-
- How to Add a User to a Joomla Group Programmatically
- How to Send Emails in Joomla with PHP
- How to Connect to an External Database in Joomla with PHP
- How to Check if the Current Page Is the Homepage in Joomla with PHP
- How to Check If the Current User is Super User in Joomla with PHP
- How to Create a User Account in Joomla with PHP
- How to Create an Article in Joomla with PHP
- PHP Scripts Collection
How to Check If the Current User is Super User in Joomla with PHP
Heads up! This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Below you can find a PHP snippet that will allow you to detect whether a user is a Super User.
use Joomla\CMS\Factory;
$isSuperUser = Factory::getApplication()->getIdentity()->authorise('core.admin');
if ($isSuperUser)
{
echo "Hey Super User";
}
Last updated on Feb 26th 2026 15:02