Tassos Marinos Tassos Marinos The home of powerful Joomla extensions Joomla Extensions Follow @tassosm
  • Joomla Extensions
  • Documentation
  • Support
  • Blog
  • About
Login
Tassos Marinos Tassos Docs
Joomla
Contact Support
MENU
  • Tutorials
    • 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
  • Troubleshooting
    • Fix Joomla Blank Page (White Screen of Death)
    • Fix the “There was an Error Uploading this File to the Server” Error in Joomla
    • Troubleshooting Common Joomla Extension Installation Errors
    • Common Issues
Home / Joomla / Tutorials

How to Check If the Current User is Super User in Joomla with PHP

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::getUser()->authorise('core.admin');

if ($isSuperUser)
{
    echo "Hey Super User";
}
Last updated on Nov 28th 2024 09:11
Tassos Marinos
Tassos offers a premium suite of Joomla extensions with 6 products and over 1.7 million downloads, providing reliable solutions since 2014.
Follow us on Facebook Follow us on Twitter Follow us on Linkedin Follow us on Joomla
  • Products
    • Convert Forms
    • EngageBox
    • Google Structured Data
    • Smile Pack
    • Advanced Custom Fields
    • MailChimp Auto-Subscribe
    • Bundle Plan
  • Resources
    • Documentation
    • Blog
    • Newsletter
    • Translators Program
    • Nonprofit Program
    • Sitemap
  • Company
    • About
    • Community
    • Refund Policy
    • Terms of Use
    • Contact
Rate us on TrustPilot Rated: 4.7/5
Celebrating 10 Years of Tassos
Copyright © 2014 - 2025 - Smile Motive Development LP. All Rights Reserved.