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